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.
   
 
Cart Modifiers as Radio Buttons
Posted: 01 June 2010 07:04 AM   [ Ignore ]
Has a Great Personality
Rank
Total Posts:  41
Joined  2010-05-21

Hey guys,

Firstly, wicked, wicked, wicked. cartthrob has been a long time coming!
I’m running a dev site to get to grips with it before unleashing it on my clients. So far, so good.
I’d like to ask for a little help in setting out the cart modifiers, at present I have the them working as a ‘select’ dropdown.

Is there a way to have them set out as a list with radio buttons?

My select code, that outputs 2 colour choices:

{item_options:select:product_color}
<option value="{option}">{option_name} {price}</option>
{/item_options:select:product_color} 

What I’m hoping to achieve:

<ul class="">    
     <
li id="prod_1"><input type="radio" checked="checked" value="{option}" name="colour" id="{product_sku}" class="radio" rel="{price}"
        <
label information></label>
     </
li>
     <
li id="prod_2"><input type="radio" value="{option}" name="colour" id="{product_sku}" class="radio" rel="{price}"
        <
label information></label>
     </
li>
</
ul

Any help appreciated.

Cheers

[ Edited: 09 June 2010 12:10 PM by Chris Newton ]
Profile
 
 
Posted: 01 June 2010 02:33 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

That’s a good question, I don’t think we have any sample code for that. I’ll ask Rob, and see if he can get some insight. We’re at EECI2010 conference right now though, so our response will be a bit slower than normal.

 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: 01 June 2010 04:57 PM   [ Ignore ]   [ # 2 ]
Has a Great Personality
Rank
Total Posts:  41
Joined  2010-05-21

Thanks Chris, enjoy!

Profile
 
 
Posted: 01 June 2010 06:02 PM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRankRank
Total Posts:  8342
Joined  2008-09-29

If you’re within a weblog:entries tag, you should be able to do this:

{product_color}
     
<li id="prod_{row_count}"><input type="radio" checked="checked" value="{option}" name="colour" id="{option_name}" class="radio" rel="{price}"
        <
label information></label>
     </
li>
{/product_color} 
 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: 01 June 2010 08:43 PM   [ Ignore ]   [ # 4 ]
Has a Great Personality
Rank
Total Posts:  41
Joined  2010-05-21

Perfect, thanks bro smile

Profile