Jump to content
peteravu

Sort Order, in Shopping cart, Shopping cart box, checkout and order. In 2.3.1 v 1.0

Recommended Posts

Today I uploaded Sort Order, in Shopping cart, Shopping cart box, checkout and order. In 2.3.1 v 1.0

 

By default the Sort Order is after how the customers add the product to the cart.

This will Sort Order first after the product name than after attributes name.

See example here http://www.oscommerc...showtopic=69260

Thanks to Laurent “foxp2” for make this working and also thanks to Monika “Monika in Germany”

 

Find it here: http://addons.oscommerce.com/info/8274

Edited by peteravu

Share this post


Link to post
Share on other sites

I have a slightly modifed shopping cart, and wonder if this is ok to sort 4 fileds, first by Parent Category name, then Subcategory name, then Product name, and product attributes. A little hard to get my head around array_multisort.

 

What should array_map be applied to? Why isn't it applied to attributes in your original code?

 

	  foreach ($products as $key => $row) {

	    $parcater[$key] = $row['parentcatname'];
	    $subcater[$key] = $row['subcatname'];
		 $attributes[$key] = $row['attributes'];
		 $name[$key] = $row['name'];


   }
   array_multisort(array_map('strtolower',$parcater), $subcater, array_map('strtolower',$name), $attributes, SORT_ASC, $products, SORT_ASC);

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×