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)
-   -   # columns layout - products and sub-categories (https://forum.x-cart.com/showthread.php?t=11034)

rapsearch 12-20-2004 11:17 AM

# columns layout - products and sub-categories
 
Hi,

I have 2 issues which i can not figure out.

In the admin, general settings/apearance you have

Display products list in multiple columns (1-3) (leave empty to use standard format):

I've set this at 3 but the only thing that chages are my 'featured products'... my main products list is still one at a row which is not how i want it. (example: http://www.rapsearch.com/store/home.php?cat=29)

I want to display more items next to each other at the sample url to reduce the amount of pages i have... how can i do this?

===============

2: My subcategories file includes:

{* ==================== Sub categories mod start *}

{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 2}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a>


<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<font size="3">{ $subcategories[cat_num].category|escape }</font></a>
{ $subcategories[cat_num].description|escape }
{if $config.Appearance.count_products eq "Y"}
{if $subcategories[cat_num].product_count}

({ $subcategories[cat_num].product_count } Products)
{elseif $subcategories[cat_num].subcategory_count}
({ $subcategories[cat_num].subcategory_count } Subcategories)
{/if}
{/if}
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}

{* ==================== Sub categories mod end *}

This gives a standard layout of 2 columns for the subcategories which works great but!..lol...always a but...

How can I edit this to display for example in subcategory number 50, more then 2 columns? I want to have 4 in that specific section because i got over 100 subcategoties there and now my page is really long to scroll down.

balinor 12-20-2004 11:26 AM

Be sure and uncheck the box that says "Display only featured products list in multicolumn format". That should give you the number of columns you want throughout the site.

rapsearch 12-20-2004 11:42 AM

That simple..lol....

Thanks!

Anyone knows the solution to my second problem??

rapsearch 12-23-2004 05:27 AM

Anyone? it must be able with some IF statements right? I'm, not to good with this :(

rapsearch 01-19-2005 03:03 AM

upping this.. good coders who know question 2?

balinor 01-19-2005 07:58 AM

Back up what you have, and then try replacing everything between the mod comment tags with this:

Code:

{if $cat eq "50"}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 4}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a>


<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<font size="3">{ $subcategories[cat_num].category|escape }</font></a>
{ $subcategories[cat_num].description|escape }
{if $config.Appearance.count_products eq "Y"}
{if $subcategories[cat_num].product_count}

({ $subcategories[cat_num].product_count } Products)
{elseif $subcategories[cat_num].subcategory_count}
({ $subcategories[cat_num].subcategory_count } Subcategories)
{/if}
{/if}
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{else}
{section name=cat_num loop=$subcategories}
{ if %cat_num.first% }
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
{/if}
{ if %cat_num.index% is div by 2}
<tr>
{/if}
<td align="center" valign="top">
<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
[img]{$xcart_web_dir}/icon.php?categoryid={$subcategories[cat_num].categoryid}[/img]</a>


<a href="home.php?cat={ $subcategories[cat_num].categoryid }">
<font size="3">{ $subcategories[cat_num].category|escape }</font></a>
{ $subcategories[cat_num].description|escape }
{if $config.Appearance.count_products eq "Y"}
{if $subcategories[cat_num].product_count}

({ $subcategories[cat_num].product_count } Products)
{elseif $subcategories[cat_num].subcategory_count}
({ $subcategories[cat_num].subcategory_count } Subcategories)
{/if}
{/if}
</td>
{ if %cat_num.last% }
</tr>
</table>
{/if}
{/section}
{/if}


rapsearch 01-19-2005 08:55 AM

Thank u :D

rapsearch 04-30-2008 07:32 AM

Re: # columns layout - products and sub-categories
 
upping this ancient thread with a quick question.

the code balinor gave still works but how to do this to multiple sub categories??

i tried {if $cat eq "217,168,169,170"} but that does not work.. how do i do this?? (and yes.. i'm a php noob..lol)

rapsearch 05-02-2008 12:47 AM

Re: # columns layout - products and sub-categories
 
anyone?

klikoo 03-23-2009 05:24 AM

Re: # columns layout - products and sub-categories
 
i have the same issue..am wondering if anyone found the solution...do lemme knw.


All times are GMT -8. The time now is 11:50 AM.

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