| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Order of items added to cart | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() When someone ads an item to the shopping cart is there anyway to have that item appear on the top of the list in the cart?
I am just thinking that when they add and item to the cart they will want to verify what they just added as being correct and if they have 20 items in their cart they are going to have to scroll all the way to the bottom to find the item they just added to verify it but if it appeared at the top it would be the first item they would see. Thanks
__________________
Dan XCart 4.1.6 Pro XCart 4.1.6 Gold Redhat 7.2 Perl 5.006001 PHP 4.1.2 |
|||||||
#2
|
|||||||
|
|||||||
![]() Interesting idea... this should work. In /include/cart_process.php in the func_add_to_cart function, around line 248 you can see where it tacks the latest addition on the end of an array, it looks like this:
$cart["products"][] = array( ... etc etc Change $cart['products'][] to $temp_arr[] then after the array is defined do this array_unshift($cart['products'],$temp_arr); I don't know if thats all you'd need to do, but it'd be a quick fix and worth a shot.
__________________
-matt version 4.1.5 |
|||||||
#3
|
|||||||
|
|||||||
![]() all you need to do is edit cart.tpl and look for the section loop for the products and change the stepping to -1
|
|||||||
#4
|
|||||||
|
|||||||
![]() Looking in /customer/main/cart.tpl
I find this section: {section name=product loop=$products} {if $products[product].hidden eq ""} <tr><td class="PListImgBox"> <a href="product.php?productid={$products[product].productid}">{if $products[product].is_pimage eq 'W' }{assign var="imageid" value=$products[product].variantid}{else}{assign var="imageid" value=$products[product].productid}{/if}{include file="product_thumbnail.tpl" productid=$imageid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].pimage_url type=$products[product].is_pimage}</a> What do I change to -1?
__________________
Dan XCart 4.1.6 Pro XCart 4.1.6 Gold Redhat 7.2 Perl 5.006001 PHP 4.1.2 |
|||||||
#5
|
|||||||
|
|||||||
![]() Yeah, i guess that would be easier, but you'll probably have to do this in more than one place (mini cart, etc).
{section name=product loop=$products step="-1"}
__________________
-matt version 4.1.5 |
|||||||
#6
|
|||||||
|
|||||||
![]() Thanks it works perfectly!
__________________
Dan XCart 4.1.6 Pro XCart 4.1.6 Gold Redhat 7.2 Perl 5.006001 PHP 4.1.2 |
|||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|