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)
-   -   Product matrix vs list (https://forum.x-cart.com/showthread.php?t=49129)

mrerotic 08-12-2009 10:36 AM

Product matrix vs list
 
Is there anyway to have a certain category display all products in 3 column matrix view and leave all others at list view?

cflsystems 08-12-2009 11:38 AM

Re: Product matrix vs list
 
You can use an if statement in subcategories.tpl where the calls for subcategories_t.tpl and subcategories_list.tpl are made

mrerotic 08-12-2009 11:52 AM

Re: Product matrix vs list
 
Like {if $cat eq '433'} do this ?

cflsystems 08-12-2009 12:14 PM

Re: Product matrix vs list
 
This is what's there by default
Code:

{if $config.Appearance.subcategories_per_row eq 'Y'}
  {if $current_category.description ne ""}
  <div class="subcategory-descr">{$current_category.description}</div>
  {/if}
  {if $subcategories}
    {include file="customer/main/subcategories_t.tpl"}
  {/if}
{else}
.............
  {if $subcategories}
    {include file="customer/main/subcategories_list.tpl"}
  {/if}
.............

so you can do something like this
Code:

{if $config.Appearance.subcategories_per_row eq 'Y'}
  {if $current_category.description ne ""}
  <div class="subcategory-descr">{$current_category.description}</div>
  {/if}
  {if $subcategories and $current_category.categoryid eq "433"}
    {include file="customer/main/subcategories_t.tpl"}
  {/if}

{else}
.............
  {if $subcategories}
    {include file="customer/main/subcategories_list.tpl"}
  {/if}
.............

or the same for subcategories_list.tpl, depending on how you need it


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

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