X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   How to set 2 different column numbers? (https://forum.x-cart.com/showthread.php?t=73101)

Eyeglasses Expert 11-18-2015 04:39 AM

How to set 2 different column numbers?
 
How to let category a display 2 columns, and let category b display 3 columns, pls?

totaltec 11-19-2015 02:06 PM

Re: How to set 2 different column numbers?
 
This really depends on how you want to do this. I think I would handle it with CSS.

Just add in your products_t.tpl somewhere a class definition associated with categoryid.

I'm assuming the categoryid is assigned to Smarty, and it is something like this {$cat} = 123

So in the container div you could do something like this:
Code:

<div class="products{if $cat != ''}cat-{$cat}{/if}">

Then you can add CSS specific to that category.

cheap eyeglasses 11-22-2015 02:12 PM

Re: How to set 2 different column numbers?
 
i am planning to use 2 different categories templates for www.loupesusa.com , because i may add other text block or images at different places of different template.

totaltec 11-23-2015 05:39 AM

Re: How to set 2 different column numbers?
 
If you want to use different category templates entirely, just add a checkbox on the category page in admin. I have tutorials that will guide you through that, just click the link in my signature.

Then in the templates, check if the checkbox is checked and switch category templates based on that.


All times are GMT -8. The time now is 05:03 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.