Base Tag Library
Note: We have updated our folder structure in Neto 6 and this has not been updated on all tweaks yet. More info.

list_item_variations

Generates a list of inventoried product variations related to designated SKU

Example

[%list_item_variations id:'[@current_sku@]'%]
    [%param header%]
        <input type="hidden" id="_itmspec_sku" value="[%nohtml%][@sku@][%/nohtml%]">
    [%/param%]
    [%param *variation_header%]
        <div ref="[@specific_id@]">
            <h4>[@specific_name@]</h4>
            <div class="specific">
                <input type="hidden" class="_itmspec_val" ref="[@specific_id@]" value="[@selected_id@]">
    [%/param%]
    [%PARAM *variation_body%]
        <div class="_itmspec_listitm" ref="[@specific_id@]_[@value_id@]">
            <a class="_itmspec_lnk [%if [@selected@]%]_itmspec_selected[%/if%]" href="javascript:void(0);" ref="[@specific_id@]_[@value_id@]">
            [%if [@value_image@]%]
                <img src="[@value_image@]" alt="[@value_name@]" />
            [%/if%]
            [%if [@value_description@]%]
                [@value_name@]
            [%else%]
                [@value_description@]
            [%/if%]
            </a>
        </div>
    [%/param%]
    [%param *variation_body_radio%]
        <label class="_itmspec_listitm" ref="[@specific_id@]_[@value_id@]">
            <input class="_itmspec_radio" type="radio" name="_itmspec_radio[@specific_id@]" value="[@value_id@]" ref="[@specific_id@]_[@value_id@]" [%if [@selected@]%]checked[%/if%]>
            [@value_name@]
        </label>
    [%/param%]
    [%param *variation_body_image%]
        <div class="_itmspec_listitm" ref="[@specific_id@]_[@value_id@]">
            <a class="_itmspec_lnk [%if [@selected@]%]_itmspec_selected[%/if%]" href="javascript:void(0);" ref="[@specific_id@]_[@value_id@]">
                [%if [@value_image@]%]
                    <img src="[@value_image@]" alt="[@value_name@]">
                [%else%]
                    [@value_name@]
                [%/if%]
            </a>
        </div>
    [%/param%]
    [%param *variation_footer%]
        </div>
        </div>
    [%/param%]
    [%param *variation_header_select%]
        <div class="_itmspec_listopt" ref="[@specific_id@]">
            <h4>[@specific_name@]</h4>
            <div class="specific">
                <input type="hidden" class="_itmspec_val" ref="[@specific_id@]" value="[@selected_id@]">
                <div class="_itmspec_optpl" ref="[@specific_id@]">
                <select class="_itmspec_opt" ref="[@specific_id@]">
    [%/param%]
    [%param *variation_body_select%]
        <option value="[@value_id@]" [%if [@selected@]%]selected[%/if%]>[@value_name@]</option>
    [%/param%]
    [%param *variation_footer_select%]
        </select>
        </div>
        </div>
        </div>
    [%/param%]
    [%param footer%]
    [%/param%]
[%/list_item_variations%]

Usage

The list_items_variations tag will generate a list of options for different variations of a product. These variations are sorted based on the sort order which can be specified on the control panel under Products->Product Specifcs->Select The Specific Name Whose Options You Wish to Alter. The variations available will be generated on the specifics assigned to the variation items configured in neto and displayed based on the formatting in the tag. Typically we recommend placing the tag with all the potential options so whoever is configuring the products in neto can easily adjust the product options available without extra HTML needing to be installed to cover new options.

In the context of the list_item_variations tag the "specific" refers to the general type of option, for examples Size or colour. The "value" refers to the option specified, for example small or red

list_item_variations Parameters

Name Options Description
id:'' String The SKU you want to query for the available variations
variation_header HTML & b@se tags Header for each variation with the exception for the select type
variation_header_select HTML & b@se tags Header for each variation with the select type
variation_body HTML & b@se tags Loads the variation option for each specific that uses the display style "Text only" & "Image with text"
variation_body_radio HTML & b@se tags Loads the variation option for each specific that uses the display style "Radio button"
variation_body_image HTML & b@se tags Loads the variation option for each specific that uses the display style "Image only"
variation_body_select HTML & b@se tags Loads the variation option for each specific that uses the display style "Select box"
*variation_footer_select HTML & b@se tags Footer for each specific with the display style "Select box"
header HTML & b@se tags Renders a single usable space above the variation options
footer HTML & b@se tags Renders a single usable space below the variation options

list_item_variations Data Tags

Name Description
[@sku@] The parent SKU
[@variation_sku@] The variation's SKU
[@specific_id@] The unique ID for the specific
[@specific_name@] The specific name
[@value_id@] The variation's SKU
[@value_image@] The URL for the image associated with the specific value
[@value_name@] The name of the specific value
[@selected@] Prints either a 0 or 1 if variation printed is currently the selected/active variation

1 related articles found: