Zen Cart Logo
Forums / Bug Reports / [Done v2.0] Repeated ids in tpl_shopping_cart_default.php

[Done v2.0] Repeated ids in tpl_shopping_cart_default.php

Locked

Views: 1,195

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
13 Nov 2009, 2:56 PM
#1
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

[Done v2.0] Repeated ids in tpl_shopping_cart_default.php

Hi,

in

catalog\includes\templates\template_default\templates\tpl_shopping_cart_default.php

from line 63-123 the array of products in the cart is output.

At line 85:

<a href="<?php echo $product['linkProductsName']; ?>"><span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle"><?php echo $product['productsName'] . $product['flagStockCheck']; ?></span></a>

the id="cartImage" and id="cartProdTitle" are declared and so get repeated for every product in the array. An id should be used only once on a page.

regards
Steve

15 Nov 2009, 12:22 AM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: [Done v2.0] Repeated ids in tpl_shopping_cart_default.php

As "cartImage" and "cartProdTitle" are not declared in any CSS file, one only needs to change it from ID to CLASS.

<span id="cartImage" class="back"><?php echo $product['productsImage']; ?></span><span id="cartProdTitle">

becomes

<span class="cartImage back"><?php echo $product['productsImage']; ?></span><span class="cartProdTitle">

I know the Thread Title was changed to [Done v2.0] but thought I would mention the specific fix for those that want to correct it now. :smile:
****

15 Nov 2009, 8:42 AM
#3
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,872
Plugin Contributions:
7

Re: [Done v2.0] Repeated ids in tpl_shopping_cart_default.php

Thanks

Steve