How To Detect Mobile/computer Device In Cart_Content.tpl

Hello,

In cart_content.tpl I wanted to make changes so that I show only the cart icon for mobile and the keep the earlier default output for computer. Can you please let me know how to get the device type, mobile or computer, in cart_content.tpl.

cart_content.tpl line 6 onwards ------------------

{hook name="checkout:dropdown_title"}
{if $smarty.session.cart.amount}



{$smarty.session.cart.amount} {__("items")} {__("for")} {include file="common/price.tpl" value=$smarty.session.cart.display_subtotal}


{else}



{__("cart_is_empty")}

--------

Member please suggest how can I get the device type. Can I get it from $smarty.session.

Thanks,

Sunil

You can use the following classes here

visible-phone
visible-tablet
visible-desktop
hidden-phone
hidden-tablet
hidden-desktop