{"id":67593,"date":"2016-03-30T04:12:32","date_gmt":"2016-03-30T08:12:32","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=67593"},"modified":"2016-07-19T08:08:22","modified_gmt":"2016-07-19T12:08:22","slug":"magento-how-to-disable-cart-on-mobile-devices","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/magento-how-to-disable-cart-on-mobile-devices.html","title":{"rendered":"Magento. How to disable cart on mobile devices"},"content":{"rendered":"<p>Hello! This video tutorial shows how to<strong> disable cart <\/strong>on <strong>mobile devices<\/strong> in Magento templates.<\/p>\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=YX_lE2FY4Es?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to disable cart on mobile devices<\/a>\r\n<p>You may want to remove the cart from your mobile Magento store since it takes much space or you simply do not like it:<\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_1.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_1-300x237.png\" alt=\"magento_disable_mobile_cart_1\" width=\"300\" height=\"237\" class=\"aligncenter size-medium wp-image-67594\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_1-300x237.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_1-150x119.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_1.png 767w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<p>Let&#8217;s learn how to get rid of it.<\/p>\r\n<ol>\r\n\t<li>\r\n\t\t<p>Using <strong>Total Commander<\/strong> or any other file manager software use the <strong>search<\/strong> command to find the file which contains <strong>&#8220;header-minicart&#8221;<\/strong> class &#8211; in our case it is <strong>header.phtml<\/strong> file under <strong>\/app\/design\/frontend\/tm_themes\/themeXXX\/template\/page\/html\/<\/strong> directory (where <strong>XXX<\/strong> is your theme number).<\/p>\r\n\t<\/li>\r\n\t<li>\r\n\t\t<p>Open the file for editing and look for the following string of code:<\/p>\r\n\t<\/li>\r\n<\/ol>\r\n<pre class=\"brush:php\">\r\n\t&lt;div class=&quot;header-minicart&quot;&gt;\r\n\t&lt;?php \r\n\techo $this-&gt;getChildHtml('minicart_head');\r\n\t?&gt;\r\n\t&lt;\/div&gt;\r\n<\/pre>\r\n<p>Simply comment out the code so it looks as follows:<\/p>\r\n<pre class=\"brush:php\">\r\n\t&lt;!--&lt;div class=&quot;header-minicart&quot;&gt;\r\n\t&lt;?php\r\n\techo $this-&gt;getChildHtml('minicart_head');\r\n\t?&gt;\r\n\t&lt;\/div&gt;-&gt;\r\n<\/pre>\r\n<p>Save the file and refresh the page to see changes.<\/p>\r\n<p>You can see the <strong>Cart<\/strong> has been successfully removed from your mobile store:<\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_2.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_2-300x235.png\" alt=\"magento_disable_mobile_cart_2\" width=\"300\" height=\"235\" class=\"aligncenter size-medium wp-image-67595\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_2-300x235.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_2-150x117.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_2.png 768w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<p>Let&#8217;s now stretch three buttons through the whole width of the mobile menu so it looks nice.<\/p>\r\n<p>Use the <strong>Firebug extension<\/strong> for Firefox or the <strong>Developer tool <\/strong>of your favourite browser to find CSS rule that needs to be altered.<\/p>\r\n<p>You can see the desired code is located in the <strong>styles.css<\/strong> file on line <strong>15107<\/strong>:<\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_3.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_3-300x182.png\" alt=\"magento_disable_mobile_cart_3\" width=\"300\" height=\"182\" class=\"aligncenter size-medium wp-image-67597\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_3-300x182.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_3-150x91.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_3.png 988w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<p>Open the file for editing and change the <strong>width<\/strong> property to <strong>33.335%<\/strong>.<\/p>\r\n<p>Again, save the file to apply changes. Navigate back to your front-end and refresh the page to see the result.<\/p>\r\n<p>You can see the mobile menu looks nice now:<\/p>\r\n\r\n<a href=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_4.png\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_4-300x182.png\" alt=\"magento_disable_mobile_cart_4\" width=\"300\" height=\"182\" class=\"aligncenter size-medium wp-image-67599\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_4-300x182.png 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_4-150x91.png 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2016\/03\/magento_disable_mobile_cart_4.png 990w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>\r\n<p>This is the end of the tutorial. We have learnt how to <strong>disable cart<\/strong> on <strong>mobile devices<\/strong> in your Magento template.<\/p>\r\n\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n\r\n<a href=\"http:\/\/www.youtube.com\/watch?v=YX_lE2FY4Es?width=1280&amp;height=720\" rel=\"prettyPhoto\">Magento. How to disable cart on mobile devices<\/a>","protected":false},"excerpt":{"rendered":"<p>This video tutorial shows how to<strong> disable cart <\/strong>on <strong>mobile devices<\/strong> in Magento templates.<\/p>\n","protected":false},"author":68,"featured_media":67604,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[729],"tags":[614,2105,1537,2407,981],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/67593"}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=67593"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/67593\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/67604"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=67593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=67593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=67593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}