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

stewart.adam’s picture

Version: » 6.x-2.x-dev
Status: Active » Fixed

If 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 ): to foreach ( $items as $index => $item ): and then you could toggle the class with something like $parity = ($i % 2 == 0 ? 'even' : 'odd');

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.