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.
   
 
Formatting for item options in cart?
Posted: 08 April 2010 07:34 PM   [ Ignore ]
Is a Really Great Dancer
RankRank
Total Posts:  52
Joined  2010-04-01

Is there something I’m missing in regards to controlling how an item’s options appear in the cart?

From what I can tell, there’s no way to just list whatever options might be available ... I instead have to specifically include tags for all potential item options?  And if this is the case, do I then have to do a conditional check for each one to include some surrounding markup?

i.e.

{if has_item_options}
<tr>
    <
td class="cart-options" colspan="3">
    
{if '{item_options:Subscription_Type}' != ''}<span class="option">{item_options:Subscription_Type}</span>{/if}
    {if 
'{item_options:Subscription_Start}' != ''}<span class="option">{item_options:Subscription_Start}</span>{/if}
    
</td>
</
tr>
{/if} 

Would be great to have an item_options iterator, like:

{exp:cartthrob:item_options row_id="{row_id}" open="<li>" close="</li>"

Or something?

Profile
 
 
Posted: 08 April 2010 09:06 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRank
Total Posts:  3379
Joined  2009-05-29

This is something I hadn’t thought of, but it makes total sense. The challenge is coming up with a clean solution. Let us think about this for a while and get back to you.

For now, yes, you’ll have to specifically enumerate each potential item option with conditionals, like in your code sample there.

Profile
 
 
Posted: 08 April 2010 10:40 PM   [ Ignore ]   [ # 2 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

I love that suggestion. It sounds so simple (it won’t be wink but I love it. Rob and I will talk in the morning of the realities of doing something like this. This particular issue has been something that I’ve considered time to time, but I think we’re in a position where we could deliver this, and I think most people will really want this feature.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 08 July 2010 02:50 PM   [ Ignore ]   [ # 3 ]
Is a Really Great Dancer
RankRank
Total Posts:  52
Joined  2010-04-01

Any update on this one guys?

Profile
 
 
Posted: 08 July 2010 04:57 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

We have it on our list, but no ETA. The next major item we have is site wide discounts. After that we’ll reevaluate, and see what’s highest on the list.

We discussed this previously, but came to the conclusion that it’s not a quick / easy change, so we have to hold off for now.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 08 November 2010 03:47 PM   [ Ignore ]   [ # 5 ]
Is a Really Great Dancer
RankRank
Total Posts:  52
Joined  2010-04-01

Ping.  smile

Profile
 
 
Posted: 08 November 2010 04:42 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

Discounts are done now. BUT we’re working on the EE 2.1 version of CartThrob.

That said, this issue has been personally bugging me for a LONG time. I’ll see if I have a few minutes tonight. I think it’d need, at a minimum a weblog_id parameter, or we could glean the item_options from the entry id as well. Thoughts?

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile
 
 
Posted: 08 November 2010 05:02 PM   [ Ignore ]   [ # 7 ]
Is a Really Great Dancer
RankRank
Total Posts:  52
Joined  2010-04-01

Hey Chris—I know 2.1 compatibility is top priority, but thanks for taking a minute to think about this.

I think an entry_id parameter makes the most sense for a standalone tag, which could be useful, but thinking about this now, wouldn’t a tag pair within cart_items_info make more sense?. e.g.

{exp:cartthrob:cart_items_info}
Title
:{title}
Quantity
{quantity}
Price
{price}
{if has_item_options}
<ul>
{item_options}
    
<li>{item_option_name}{item_option_value}</li>
{/item_options}
</ul>
{/if}
{
/exp:cartthrob:cart_items_info} 

Same goes for the {order_items} tag pair, for displaying on invoices, etc (though I can imagine a tag pair within a tag pair within a weblog:entries loop might be a nightmare).

Profile
 
 
Posted: 25 January 2011 09:01 PM   [ Ignore ]   [ # 8 ]
Is a Really Great Dancer
RankRank
Total Posts:  52
Joined  2010-04-01

Another quick ping here. I know you guys are busy. But I just went through a project where I had to write a plugin for two separate places (one in the cart using the session data, the other for grabbing and deserializing data from the Orders weblog) for this very purpose.

Any chance this is making it into the EE2 version?

Profile
 
 
Posted: 25 January 2011 09:55 PM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

It will be included in the EE2 version. And I might also include it in the current version…. because other than the lack of reorderable tax and shipping settings in the current version this is one of the things I’m most annoyed by myself.

I’d like to simplify item options / price modifiers and shipping as much as possible. We’ll be doing ongoing refinements in this area. Rob is off on paternity leave this week, so I’m totally swamped… but if I’m thinking about it, I’ll see about porting some code back to EE1 for this.

 Signature 

NOTE: If I say “I will look into x” and you PM me information, please do not hesitate to contact me again about it, if I do not respond in several hours, or at most a day. Please feel free to remind me as you see fit

Profile