View Single Post
  #1  
Old 08-29-2010, 05:54 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default $cat_products and $f_products displaying differently

Hi, I've come across what appears to be a bug (but may just be me doing things I shouldn't!).
I have made a bottom border for the first product box in Featured Products, then a left and bottom border for the next product (which has the class of .highlight).

This works fine in Featured Products, but in subcategory products, it displays the first product with the class of .highlight, instead of the second, and it ruins the look.

You can view this on the site I am working on:

www.mrdtrading.co.uk/home.php?shopkey=martin

The home page displays featured products correctly, but on this page you'll see the problem:

http://www.mrdtrading.co.uk/Karts-By-Colour-c-31/

/customer/main/featured.tpl
uses this code:
{include file="customer/main/products.tpl" products=$f_products featured="Y"}

whereas

/customer/main/subcategories.tpl
uses this code:
{include file="customer/main/products.tpl" products=$cat_products}

(Sorry that everything is now in bold, the forum software won't allow me to change it.)

So there appears to be a bug in the way that $cat_products decides whether the first or second product should be the highlighted one - it should be the second, fourth, sixth, etc. but $cat_products is making it the first, third and fifth.

I believe that
/customer/main/products_list.tpl
pulls through the styles using the code at line 23:
<div{interline name=products additional_class=item}>

as
/customer/main/products_list.tpl
is used by both the Featured Products page, and the category featured products, and subcategory 'all products in that subcategory' pages.

__________________
X-Cart Gold Version 4.3.2
Reply With Quote