{"id":56126,"date":"2015-10-21T04:22:05","date_gmt":"2015-10-21T08:22:05","guid":{"rendered":"http:\/\/www.templatemonster.com\/help\/?p=56126"},"modified":"2016-02-17T04:43:11","modified_gmt":"2016-02-17T09:43:11","slug":"opencart-2-x-how-to-change-order-of-featured-latest-bestsellers-tabs-on-home-page","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/opencart-2-x-how-to-change-order-of-featured-latest-bestsellers-tabs-on-home-page.html","title":{"rendered":"OpenCart 2.x. How to change order of Featured, Latest, Bestsellers tabs on home page"},"content":{"rendered":"<p><a href=\"http:\/\/www.youtube.com\/watch?v=R1qKP6UsHPI?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. How to change order of Featured, Latest, Bestsellers tabs on home page<\/a><\/p>\r\n<p>This tutorial will show you how to change order of <strong>Featured<\/strong>, <strong>Latest<\/strong>, <strong>Bestsellers<\/strong> tabs on home page in OpenCart 2.x.<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-1.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-1-300x169.jpg\" alt=\"OpenCart 2.x. How to change Featured, Latest, Bestsellers tabs order on home page-1\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-56127\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-1-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-1-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-1.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<ol>\r\n<li>\r\n<p>Use FTP or cPanel and navigate to catalog\\view\\theme\\themeXXX\\template\\module\\tm_single_category_product.tpl file. On lines 25-48 you will find the following code:<\/p>\r\n<pre class=\"brush:php\"> \r\n\t\t&lt;?php if ($latest_products) { ?&gt;\r\n                        &lt;li&gt;\r\n                            &lt;a href=\"#tab-latest-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                               data-toggle=\"tab\"&gt;&lt;?php echo $heading_latest; ?&gt;&lt;\/a&gt;\r\n                        &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n                &lt;?php if ($featured_products) { ?&gt;\r\n                        &lt;li&gt;\r\n                            &lt;a href=\"#tab-featured-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                               data-toggle=\"tab\"&gt;&lt;?php echo $heading_featured; ?&gt;&lt;\/a&gt;\r\n                        &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n                &lt;?php if ($special_products) { ?&gt;\r\n                        &lt;li&gt;\r\n                            &lt;a href=\"#tab-specials-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                               data-toggle=\"tab\"&gt;&lt;?php echo $heading_specials; ?&gt;&lt;\/a&gt;\r\n                        &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n                &lt;?php if ($bestseller_products) { ?&gt;\r\n                        &lt;li&gt;\r\n                            &lt;a href=\"#tab-bestsellers-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                               data-toggle=\"tab\"&gt;&lt;?php echo $heading_bestsellers; ?&gt;&lt;\/a&gt;\r\n                        &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p> Now you need to cut and paste the block of code which is responsible for a tab you want to move before or after other tabs. Let&#8217;s make the <strong>Featured<\/strong> products the last tab. For this we need to move the following block of code:<\/p>\r\n<pre class=\"brush:php\">  \r\n\t\t&lt;?php if ($featured_products) { ?&gt;\r\n\t\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=\"#tab-featured-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n\t\t\t\tdata-toggle=\"tab\"&gt;&lt;?php echo $heading_featured; ?&gt;&lt;\/a&gt;\r\n\t\t\t&lt;\/li&gt;\r\n\t\t&lt;?php } ?&gt;\r\n<\/pre>\r\n<p>After the code which is displaying bestsellers:<\/p>\r\n<pre class=\"brush:php\"> \r\n\t\t&lt;?php if ($bestseller_products) { ?&gt;\r\n\t\t\t&lt;li&gt;\r\n\t\t\t&lt;a href=\"#tab-bestsellers-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n\t\t\t\tdata-toggle=\"tab\"&gt;&lt;?php echo $heading_bestsellers; ?&gt;&lt;\/a&gt;\r\n\t\t\t&lt;\/li&gt;\r\n\t\t&lt;?php } ?&gt;\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p>The code after the changes should look like this:<\/p>\r\n<pre class=\"brush:php\"> \r\n\t\t&lt;?php if ($latest_products) { ?&gt;\r\n                    &lt;li&gt;\r\n                        &lt;a href=\"#tab-latest-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                            data-toggle=\"tab\"&gt;&lt;?php echo $heading_latest; ?&gt;&lt;\/a&gt;\r\n                    &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n                &lt;?php if ($special_products) { ?&gt;\r\n                    &lt;li&gt;\r\n                        &lt;a href=\"#tab-specials-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                            data-toggle=\"tab\"&gt;&lt;?php echo $heading_specials; ?&gt;&lt;\/a&gt;\r\n                    &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n                &lt;?php if ($bestseller_products) { ?&gt;\r\n                    &lt;li&gt;\r\n                        &lt;a href=\"#tab-bestsellers-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                            data-toggle=\"tab\"&gt;&lt;?php echo $heading_bestsellers; ?&gt;&lt;\/a&gt;\r\n                    &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n\t\t&lt;?php if ($featured_products) { ?&gt;\r\n                    &lt;li&gt;\r\n                        &lt;a href=\"#tab-featured-&lt;?php echo $module; ?&gt;\" role=\"tab\"\r\n                            data-toggle=\"tab\"&gt;&lt;?php echo $heading_featured; ?&gt;&lt;\/a&gt;\r\n                    &lt;\/li&gt;\r\n                &lt;?php } ?&gt;\r\n<\/pre>\r\n<\/li>\r\n<li>\r\n<p> Save the file, reupload it and reload your page. Now your <strong>Featured<\/strong> tab is the last tab:<\/p>\r\n<p><a href=\"\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-2.jpg\"><img loading=\"lazy\" src=\"\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-2-300x169.jpg\" alt=\"OpenCart 2.x. How to change Featured, Latest, Bestsellers tabs order on home page-2\" width=\"300\" height=\"169\" class=\"aligncenter size-medium wp-image-56128\" srcset=\"https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-2-300x169.jpg 300w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-2-150x84.jpg 150w, https:\/\/www.templatemonster.com\/help\/wp-content\/uploads\/2015\/10\/OpenCart-2.x.-How-to-change-Featured-Latest-Bestsellers-tabs-order-on-home-page-2.jpg 1000w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\r\n<\/li>\r\n<\/ol>\r\n<p>Thank you for checking our tutorial. Now you know how to change order of <strong>Featured<\/strong>, <strong>Latest<\/strong>, <strong>Bestsellers<\/strong> tabs on home page in OpenCart 2.x.<\/p>\r\n<p>Feel free to check the detailed video tutorial below:<\/p>\r\n<p><a href=\"http:\/\/www.youtube.com\/watch?v=R1qKP6UsHPI?width=1280&amp;height=720\" rel=\"prettyPhoto\">OpenCart 2.x. How to change order of Featured, Latest, Bestsellers tabs on home page<\/a><\/p>\r\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial will show you how to change order of <strong>Featured<\/strong>, <strong>Latest<\/strong>, <strong>Bestsellers<\/strong> tabs on home page in OpenCart 2.x.<\/p>\n","protected":false},"author":93,"featured_media":56131,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1156],"tags":[2091,831,684,1157,857,977],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/56126"}],"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\/93"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=56126"}],"version-history":[{"count":0,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/56126\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media\/56131"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=56126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=56126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=56126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}