View Single Post
  #1401  
Old 09-04-2019, 06:39 AM
 
PhilJ PhilJ is offline
 

X-Guru
  
Join Date: Nov 2002
Posts: 4,094
 

Default Re: X-Cart - reBOOT - Responsive Template

@Pinakin...

1) In skin/reboot/customer/home.tpl

Before...
Code:
</head>
Insert...

Code:
<script>var $ccatid;{if $current_category.categoryid}$ccatid={$current_category.categoryid};{/if}</script>
2) In skin/reboot/js/custom/reboot_products.js

After...
Code:
setGrid(); // USAGE: setGrid(); or setRows(); or setList(); }
Insert...
Code:
// Set Products Layout to 'List' for Specific Categories //------------------------------------------ if ($ccatid){ var prev_products_layout = products_layout; console.log("Current Layout: "+prev_products_layout); console.log("Category ID: "+$cat); if ($ccatid == 7 || $ccatid == 999999999){ $('.products-container .item').removeClass('col-xs-12 col-sm-6 col-md-4 col-lg-4 col-lg-12 grid-view rows-view list-view').addClass('col-lg-12 list-view'); $('button.switcher').removeClass(selectedClass); $('button.switch_layout_list').addClass(selectedClass); } else { if (prev_products_layout == 'Grid') { setGrid(); } else if (prev_products_layout == 'Rows') { setRows(); } else if (prev_products_layout == 'List') { setList(); } } }
Replace the numbers in red with the category ID(s).
__________________
xcartmods.co.uk
Reply With Quote