View Single Post
  #1  
Old 04-22-2003, 01:05 AM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default Display Added Products in Cart, in Reverse -- one line code.

Hello X-carters.
X-cart displays products added from top to bottom (oldest to newest),
Customers might find it irritating to scroll down your Cart page, to see if s/he added the products successfully.

A very simple 1 liner code to display them from Newest added to Oldest.

In your {x-cart-skin1-dir}/customers/main/cart.tpl locate line no.14:
Code:
{section name=product loop=$products}
Ammend this code to
Code:
{section name=product loop=$products start=-1 step=-1}

1. Start=-1 <=> Tells loop to start at the end of array
2. Step =-1 <=> loops backward 1 step at a time

Hope it helps some of you out.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote