Project Home
Manuals
Contact Us
Download
Demo
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
AbanteCart v
1.4.0
is released.
Home
Help
Search
Calendar
Login
Register
AbanteCart Community
»
eCommerce construction
»
How-to questions
»
Sort items in cart according to price
« previous
next »
Print
Pages: [
1
]
Author
Topic: Sort items in cart according to price (Read 5094 times)
potangina
Newbie
Posts: 10
Karma: +0/-0
Sort items in cart according to price
«
on:
March 06, 2018, 11:03:21 AM »
Hello! how can i sort items in the cart according to price?
Logged
"Death is like a wind, always by my side"
- Cancer
abantecart
Administrator
Hero Member
Posts: 4362
Karma: +301/-10
Re: Sort items in cart according to price
«
Reply #1 on:
March 06, 2018, 06:40:45 PM »
A little more details would be helpful.
I assume you refer to shopping cart page.
Are you looking to sort the display permanently or offer option to sort product in the shopping cart page?
In case of sorting permanently you can use PHP sorting in this file (before line 270):
https://github.com/abantecart/abantecart-src/blob/master/public_html/storefront/controller/pages/checkout/cart.php#L270
Sort array $cart_products by key 'price'. If you need to sort including tax, you would need to add tax calculation prior to sorting
Logged
Please
rate your experience
or
leave your review
We need your help to build better free open source ecommerce platform for everyone. See how you can
help
potangina
Newbie
Posts: 10
Karma: +0/-0
Re: Sort items in cart according to price
«
Reply #2 on:
March 06, 2018, 10:13:39 PM »
thanks for the quick response and sorry for the inadequate info i provided, yes, i was referring to the shopping cart page as well as the cart that appears when you hover over the "ITEMS" button at the storefront homepage.
Logged
"Death is like a wind, always by my side"
- Cancer
Print
Pages: [
1
]
« previous
next »
AbanteCart Community
»
eCommerce construction
»
How-to questions
»
Sort items in cart according to price
Powered by SMFPacks Social Login Mod