Your account is limited to posting only in the Pre-Sales Questions forum.
Support forum access is limited to members with a purchase history.

If you are working on behalf of another member, please contact us with the name of the license holder and we will upgrade your account.
   
 
Sort cart by product category
Posted: 06 October 2011 03:03 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  20
Joined  2011-03-09

Hi,

I am little stuck and could not find anything relating to my problem in documentation or forum, so thought I would post a quick query. I wondered if it was possible to sort a cart by product category and then name? It is not so important in the basket, but needs to be done in the admin email - any ideas/tips would be much appreciated.

Thank you advance,

Adam

Profile
 
 
Posted: 07 October 2011 08:46 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

There’s no way built-in way to do this, maybe it could be done with some PHP. I can move this to feature requests if you want.

Profile
 
 
Posted: 07 October 2011 09:04 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  20
Joined  2011-03-09

Ok yeah that would be great.

I will post back if I find a solution - do you have any idea where be a good place to start? I didn’t know if I could do something with the entry ID’s in the cart?

Thanks,

Adam

Profile
 
 
Posted: 07 October 2011 09:10 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

This is off the top of my head, but hopefully it’ll give you a head start:

{exp:cartthrob:submitted_order_info}
{embed
="site/admin_email_entries" entry_ids="{order_items}{item:entry_id}|{/order_items}"}
{
/exp:cartthrob:submitted_order_info} 
{exp:channel:entries channel="products" entry_id="{embed:entry_ids}" dynamic="no" orderby="category|title"}

{
/exp:channel:entries} 
Profile
 
 
Posted: 07 October 2011 09:34 AM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  20
Joined  2011-03-09

Ha, legend!

Profile
 
 
   
 
 
‹‹ Weight Modifer      Customer_info card number ››