Zen Cart Logo
Forums / General Questions / Editing Shopping Cart Sidebox to display only last item added

Editing Shopping Cart Sidebox to display only last item added

Locked

Views: 891

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
26 Oct 2010, 12:27 AM
#1
shakes222 avatar

shakes222

New Zenner

Join Date:
Aug 2010
Posts:
10
Plugin Contributions:
0

Editing Shopping Cart Sidebox to display only last item added

I've been playing around with the code for awhile now but just haven't been able to make any headway on this. I'm hoping to alter the shopping cart sidebox to display only the last product added along with it's corresponding product image.

If anyone has any suggestions on the most efficient way to do this I could really use a helping hand. Thanks!

26 Oct 2010, 4:23 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Editing Shopping Cart Sidebox to display only last item added

Try editing the tpl_shopping_cart.php for the sidebox and change this code:

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      $content .= '<li>';

to read:

    for ($i=0, $n=sizeof($products); $i<$n; $i++) {
      $content = '<li>';

This should only leave the last thing added to the customers_basket as being displayed in the shopping cart sidebox ...