Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


peteravu

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
Link to comment
Share on other sites

  • 5 months later...

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);

Link to comment
Share on other sites

  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...