Post by geradpigen » Thu Sep 17, 2020 2:17 pm

How can I sort products added to the cart by alphabet, I use opencart 3.0.2

Newbie

Posts

Joined
Tue Jun 16, 2020 7:06 pm

Post by letxobnav » Thu Sep 17, 2020 2:59 pm

system/library/cart/cart.php, function getProducts

before:

Code: Select all

return $product_data;
add:

Code: Select all

		uasort($product_data, function($a, $b) {
			return $a['name'] <=> $b['name'];
		});
		

Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces

“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan
Who is online

Users browsing this forum: No registered users and 10 guests