Closed (fixed)
Project:
Ubercart AJAX Cart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2010 at 18:56 UTC
Updated:
13 Jun 2012 at 23:21 UTC
I used uc_ajax_cart_block_content.tpl.php to move the "remove" link so that it is displayed in the price td instead of its own tr
This means that every row in the table has tr class="odd" because the $items row has that class, and now that I have deleted the remove link tr, there is no longer a tr with class="even"
How do I go about editing this template so that every other $item tr is odd/even?
Thanks for a great module. I love the templates; they are so easy!
Comments
Comment #1
stewart.adam commentedIf you are making each item on its own row then you would need to implement the even/odd toggling yourself. An easy way to do this is to simply examine the item index. You would need to change
foreach ( $items as $item ):toforeach ( $items as $index => $item ):and then you could toggle the class with something like$parity = ($i % 2 == 0 ? 'even' : 'odd');