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

Thumbnails for product listings on category page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-10-2005, 12:07 PM
 
rightminddesigns rightminddesigns is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 33
 

Default Thumbnails for product listings on category page

I need to display the category view of the products with their thumbnail images and some minimal other product information. I am using the multi-column settings in the admin for the featured products page.

What I need on the category page would be 4 or 5 products per row (the Featured Items are only set up for 2). How would I go about doing this? I have created products_categories.tpl to start making revisions, but I am unsure of where to include it, etc.

Any suggestions from anyone?
__________________
X-Cart Gold 4.0.15 on Linux machine
Modules:
Features Comparison
Product Configurator
Fancy Categories (turned off)
Reply With Quote
  #2  
Old 10-10-2005, 02:19 PM
 
balinor balinor is offline
 

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

Default

Not quite sure I understand....are you simply trying to duplicate the multi-column layout of featured products, but with regular products and more columns?
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #3  
Old 10-10-2005, 02:26 PM
 
rightminddesigns rightminddesigns is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 33
 

Default Am I making this more complicated than it needs to be?

I think that is what I am trying to do.

On the home page, the featured products are currently displayed in a 2 column layout. On the category pages, it is using the default display...1 product per row with the product name, price, short description, etc. I need the category pages to display with the product thumbnails and product name, price, and a detail button (more or less).

Am I making this more complicated than it needs to be?
__________________
X-Cart Gold 4.0.15 on Linux machine
Modules:
Features Comparison
Product Configurator
Fancy Categories (turned off)
Reply With Quote
  #4  
Old 10-10-2005, 02:37 PM
 
balinor balinor is offline
 

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

Default

Yea Try unchecking the box that says 'Display only Featured Products in multi-column format'
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #5  
Old 10-10-2005, 02:41 PM
 
rightminddesigns rightminddesigns is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 33
 

Default

I really hope it is not that simple...I'd like to be smarter than that! lol

How do I set it for 2 columns on the featured items and--say--3 columns for the category level?
__________________
X-Cart Gold 4.0.15 on Linux machine
Modules:
Features Comparison
Product Configurator
Fancy Categories (turned off)
Reply With Quote
  #6  
Old 10-11-2005, 01:29 AM
  kpayne's Avatar 
kpayne kpayne is offline
 

X-Adept
  
Join Date: Dec 2002
Location: Firetanksoftware.com
Posts: 469
 

Default

You'd need to edit skin1/customer/main/featured.tpl. Make sure to make a backup copy first.

You can copy the column format code from the other tpls in your shop or there should be code here on the forums, too.
__________________
X-cart Featured Products Manager from http://www.firetanksoftware.com - Put your products where you want, how you want.
Reply With Quote
  #7  
Old 10-11-2005, 10:13 AM
 
rightminddesigns rightminddesigns is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 33
 

Default

I got it! \ (Thanks to this thread: http://forum.x-cart.com/viewtopic.php?t=14995)

Because of other customizations, I had already separated my featured products display from my regular category products by creating customized products_featured.tpl and products_t_featured.tpl files. All I had to do was modify products_t.tpl file to be like this:

Code:
{* $Id: products_t.tpl,v 1.10.2.8 2005/06/06 05:18:43 mclap Exp $ *} <TABLE border="0" width="100%" cellpadding="0" cellspacing="0"><TR><TD class="TableThumbnailBorder"> <TABLE border="0" width="100%" cellpadding="5" cellspacing="1"> {assign var="cols" value=3} {math equation="floor(100/x)" x=$cols assign="width"} {section name=product loop=$products} {assign var="discount" value=0} {if %product.index% is div by $cols} <TR> {assign var="cell_counter" value=0} {/if} {math equation="x+1" x=$cell_counter assign="cell_counter" } <TD width="{$width}%" align="center" valign="top" class="DialogBox"> <TABLE width="25%" border="0" align="left" cellpadding="3" cellspacing="0"> <TR> <TD width="372" height="100"> <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}">{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url}</A> </TD> </TR> </TABLE> {$products[product].product} {$lng.lbl_sku}: {$products[product].productcode} {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {else} {/if} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> {include file="currency.tpl" value=$products[product].list_price} </S></FONT> {/if} {/if} <FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT> <FONT class="MarketPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}, {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes} {include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes}{/if} {else} <FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT> {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0} {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now_featured.tpl" product=$products[product]} {/if}</TD> {capture name=prod_index} {math equation="index+x+1" index=%product.index% x=$cols} {/capture} {if $smarty.capture.prod_index is div by $cols } </TR> {/if} {/section} {if $cell_counter lt $cols} {section name=rest_cells loop=$cols start=$cell_counter} <TD class="DialogBox"> <hr> </TD> {/section} </TR> {/if} </TABLE> </TD></TR></TABLE> {if $active_modules.Feature_Comparison ne '' && $products && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_selected_button.tpl"} {/if}

This line here controls the number of columns, just change the value=3 to the number of columns you want it displayed in:
Code:
{assign var="cols" value=3}

Also, this relies on the "Display only featured products list in multicolumn format" checkbox not being checked in the General Settings --> Appearance Options area of the admin.

Thanks for all your help!
__________________
X-Cart Gold 4.0.15 on Linux machine
Modules:
Features Comparison
Product Configurator
Fancy Categories (turned off)
Reply With Quote
  #8  
Old 10-11-2005, 03:20 PM
 
rightminddesigns rightminddesigns is offline
 

Advanced Member
  
Join Date: Sep 2005
Posts: 33
 

Default ok...I thought I was done...

I just noticed that there is not pagination at the bottom to go to additional pages if there are more products than should be shown on the page. Can anyone tell me how/what I need to put in the file to get those page numbers include?

I know I have to put use an {if} statement to include customer/main/navigation.tpl, but I am not sure how to do it right. I know I've seen it all over the place at different times today...of course, I can't find it now when I need it.

Thanks in advance for any help!
__________________
X-Cart Gold 4.0.15 on Linux machine
Modules:
Features Comparison
Product Configurator
Fancy Categories (turned off)
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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 11:00 PM.

   

 
X-Cart forums © 2001-2020