Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

# columns layout - products and sub-categories

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-20-2004, 11:17 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default # 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.
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #2  
Old 12-20-2004, 11:26 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 12-20-2004, 11:42 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default

That simple..lol....

Thanks!

Anyone knows the solution to my second problem??
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #4  
Old 12-23-2004, 05:27 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default

Anyone? it must be able with some IF statements right? I'm, not to good with this
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #5  
Old 01-19-2005, 03:03 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default

upping this.. good coders who know question 2?
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #6  
Old 01-19-2005, 07:58 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default

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}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #7  
Old 01-19-2005, 08:55 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default

Thank u
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #8  
Old 04-30-2008, 07:32 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default 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)
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #9  
Old 05-02-2008, 12:47 AM
 
rapsearch rapsearch is offline
 

Advanced Member
  
Join Date: Nov 2004
Posts: 47
 

Default Re: # columns layout - products and sub-categories

anyone?
__________________
Version: 4.1.10
Server: Apache/mysql
Location: http://www.rapsearch.com/store
Reply With Quote
  #10  
Old 03-23-2009, 05:24 AM
 
klikoo klikoo is offline
 

Newbie
  
Join Date: Mar 2008
Posts: 3
 

Default Re: # columns layout - products and sub-categories

i have the same issue..am wondering if anyone found the solution...do lemme knw.
__________________
The MarketPlace Company
www.universtores.com
Pro 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:14 AM.

   

 
X-Cart forums © 2001-2020