Re: Product Options Customizaion ?
This worked great for me, however, there is one thing that I can not get to work. With the drop down box, when you select a color, it changes the product image to that color. With the radio buttons, I can get it to select the default color on load, but I can not get it to change the product image when I select a different color.
Here is the code that was in customer_options.tpl
Code:
<select id="po{$v.classid}" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if}>
{foreach from=$v.options item=o}
<option value="{$o.optionid}"{if $o.selected eq 'Y'} selected="selected"{/if}>{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}</option>
{/foreach}
</select>
I replaced the above with this:
Code:
{foreach from=$v.options item=o}
<input id="po{$v.classid}" type="radio" name="{$poname}"{if $disable} disabled="disabled"{/if}{if $nojs ne 'Y'} onchange="javascript: check_options();"{/if} value="{$o.optionid}" {if $o.selected eq 'Y'} checked="checked"{/if} />{$o.option_name}{if $v.is_modifier eq 'Y' && $o.price_modifier ne 0} ({if $o.modifier_type ne '%'}{include file="currency.tpl" value=$o.price_modifier display_sign=1 plain_text_message=1}{else}{$o.price_modifier}%{/if}){/if}
<br />
{/foreach}
Anyone able to help me figure out how to make it change the product image?
Thanks!!!
__________________
-
-
Versions: 4.1.10 and 4.3.0 (see post for which cart)
"Until man duplicates a blade of grass, nature can laugh at his so-called scientific knowledge." - Thomas Edison
"Never doubt that a small group of thoughtful, committed citizens can change the world; indeed, it is the only thing that ever has." - Margaret Mead (1901-197 quoted in John M. RIchardson, ed. Making it Happen, 1982
"Water is the best of all things." - Pindar (c. 522 BC - c. 438 BC), Olympian Odes
|