Is there a way to sort the cart to display line items by product type

Highlighted
Excursionist
28 0 18

Is there a way to sort the cart to sort and display line items by product type or some other property, i.e price, name, quantity, etc.?

0 Likes
Highlighted
Shopify Partner
223 1 24

Not sure if you can make that happen with liquid. But you could always use a jquery and table filter and make that happen on the spot. Kind of a drag I know but this might help if you want your user to re-arrange de rows of the cart. I would suggest

https://www.datatables.net/

Just take out the searcher and everything else you dont need. and give it some css. ;D GL 

Entrepreneur, Developer, Geek, Gamer and very passionate about WEB development! :P

Need help with your Shopify Store? Contact me: jfeuchter@gmail.com :D
0 Likes
Highlighted
Excursionist
28 0 18

I don't need the customer to have control over the sorting of the cart.  I am looking for a way to have each item ranked/sorted as it goes into the cart.  In other words, after someone clicks the Add-To-Cart button the product.type of the item being added is compared to the previously added item/items product type(s) and moved above or below them according to the sort logic.  Is there a way to do that?

 

0 Likes
Highlighted
Excursionist
21 1 1

@Jamie17 

Any luck on this? I need exactly what you mentioned- to have the cat auto-sorted by product.type

0 Likes