Help updating product_options.tpl PLEASE??

I am in the process of updating to 2.1.2 (latest I am allowed with my license)

I have one problem still. My product options template is where I have done most of my customizing. I needed to show thumbnails of color swatches along with my color options. My update is looking correct and the color swatches work as expected, but the related Size options do not. What is happening is that the javascript that is supposed to run ‘onchange’ of the select box doesn’t seem to work.

see: [url][/url]

-try selecting a black small, it should show as instock (if not click the radio button next to the color black)

-try Red Small, by changing only the color option, you should see ‘out of stock’

-try Red XSmall, by only changing the Size, it will still show ‘out of stock’, … now click the radio button beside Red, that forces the JScript to run and update the display (would like this to run on Size change) and you now see the correct ‘In stock’ message.

Can anyone please look at my template below and help me get this to work???


{* $Id: product_options.tpl 10833 2010-10-08 08:18:19Z alexions $ *}

{script src=“js/jquery.simpletip-1.3.1.js”}

{if ($settings.General.display_options_modifiers == “Y” && ($auth.user_id || ($settings.General.allow_anonymous_shopping != “P” && !$auth.user_id)))}

{assign var=“show_modifiers” value=true}


{foreach from=$product.detailed_params key=“param” item=“value”}


{if $product_options}

{if $obj_prefix}


{if $location == “cart” || $product.object_id}


{foreach name="product_options" from=$product_options item="po"}

{assign var="selected_variant" value=""}

{if !("SRC"|strpos:$po.option_type !== false && !$po.variants && $po.missing_variants_handling == "H")}
{$po.option_name}{if $po.description} {capture name="tooltip"}{$po.description}{/capture}{include file="common_templates/tooltip.tpl" tooltip=$smarty.capture.tooltip}{/if}:
{if $po.option_type == "S"} {*Selectbox*}

{foreach from=$po.variants item="vr" name=vars}
{$vr.variant_name} {if $show_modifiers}{hook name="products:options_modifiers"}{if $vr.modifier|floatval}({include file="common_templates/modifier.tpl" mod_type=$vr.modifier_type mod_value=$vr.modifier display_sign=true}){/if}{/hook}{/if}

{* START edit by DUSX *}
{elseif $po.option_type == "R"} {*Radiobutton*}
{if $po.variants}

    {foreach from=$po.variants item="vr" name="vars"}

  • onclick="{if $product.options_update}fn_change_options('{$obj_prefix}{$id}', '{$id}', '{$po.option_id}');{/if} fn_change_varian_image('{$obj_prefix}{$id}', '{$po.option_id}', '{$vr.variant_id}');"
    {if $product.exclude_from_calculate && !$product.aoc || $po.disabled}

    {if $settings.General.display_options_modifiers == "Y"}
    {hook name="products:options_modifiers"}
    {if $vr.modifier|floatval}(
    {include file="common_templates/modifier.tpl" mod_type=$vr.modifier_type mod_value=$vr.modifier display_sign=true}

    {if $vr.image_pair.image_id}
    {if $vr.variant_id == $selected_variant}
    {assign var="_class" value="product-variant-image-selected"}
    {assign var="_class" value="product-variant-image-unselected"}
    {include file="common_templates/image.tpl"
    images=$vr.image_pair object_type="product_option"

  • {/foreach}

{if !$po.value && $product.options_type == "S" && !$po.disabled}


{elseif !$po.value && $product.options_type == "S" && $po.disabled}




{* END edit by DUSX note: took out 'image_width="129"' from after 'object_type="product_option"' *}

{elseif $po.option_type == "C"} {*Checkbox*}

{foreach from=$po.variants item="vr"}
{if $vr.position == 0}


{if $show_modifiers}{hook name="products:options_modifiers"}{if $vr.modifier|floatval}({include file="common_templates/modifier.tpl" mod_type=$vr.modifier_type mod_value=$vr.modifier display_sign=true}){/if}{/hook}{/if}

{elseif $po.option_type == "I"} {*Input*}

{elseif $po.option_type == "T"} {*Textarea*}
{elseif $po.option_type == "F"} {*File*}

{include file="common_templates/fileuploader.tpl" images=$product.extra.custom_files[$po.option_id] var_name="`$name`[`$po.option_id``$id`]" multiupload=$po.multiupload hidden_name="`$name`[custom_files][`$po.option_id``$id`]" hidden_value="`$id`_`$po.option_id`" label_id="option_`$obj_prefix``$id`_`$po.option_id`" prefix=$obj_prefix}


{if $po.comment}



{if $po.regexp && !$no_script}


{capture name="variant_images"}
{if !$po.disabled}
{foreach from=$po.variants item="var"}
{if $var.image_pair.image_id}
{if $var.variant_id == $selected_variant}{assign var="_class" value="product-variant-image-selected"}{else}{assign var="_class" value="product-variant-image-unselected"}{/if}
{include file="common_templates/image.tpl" class="hand $_class object-image" show_thumbnail="Y" images=$var.image_pair object_type="product_option" image_width="50" image_height="50" obj_id="variant_image_`$obj_prefix``$id`_`$po.option_id`_`$var.variant_id`" image_onclick="fn_set_option_value('`$obj_prefix``$id`', '`$po.option_id`', '`$var.variant_id`'); void(0);"}
{* {if $smarty.capture.variant_images|trim}


{/if} *}


{if $product.show_exception_warning == "Y"}



{if !$no_script}


What does your browser error console say when you change an option selector? What is the value of $no_script.

Suggest you look at this in firebug and set a breakpoint in fn_check_exceptions(). Note: I believe fn_check_exceptions() is now out of date in 2.1.4 anyway…

You are right, I get ‘fn_check_exceptions is not defined’ when I select a new size with the select.

So, where can I find the latest version of the template? I need to have a look at the new one to see what it should be calling.

Would it be in the var/repository?