Hi
I am trying to get the product SKU or the Variant SKU to show up in the basket. I have it working where it shows the main product sku but if the product has variants i don't know how to get the variant sku to display.
Here is some code in my basket contents: The item in bold is where I think the variant code would go.
<mvt:foreach iterator="option" array="group:options">
<mvt:if expr="l.settings:option:option_id"> &mvt:option:attr_code;: &mvt:option:opt_code; : &mvt:option:opt_prompt; <mvt:item name="toolkit" param="vproduct_find|prdfound|l.all_settings:item: code" />
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
&mvt:option:attr_code;: &mvt:option:data;
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
&mvt:option:attr_code;: &mvt:option:data_long;
<mvt:else>
&mvt:option:attr_code; </mvt:if>
<br/>
</mvt:foreach>
</div>
<span class="item-code">
<mvt:if expr="l.settings:group:product:sku">
SKU: &mvt:group:product:sku;
<mvt:else>
SKU: &mvt:group:code;
</mvt:if>
Thank you!
I am trying to get the product SKU or the Variant SKU to show up in the basket. I have it working where it shows the main product sku but if the product has variants i don't know how to get the variant sku to display.
Here is some code in my basket contents: The item in bold is where I think the variant code would go.
<mvt:foreach iterator="option" array="group:options">
<mvt:if expr="l.settings:option:option_id"> &mvt:option:attr_code;: &mvt:option:opt_code; : &mvt:option:opt_prompt; <mvt:item name="toolkit" param="vproduct_find|prdfound|l.all_settings:item: code" />
<mvt:elseif expr="NOT ISNULL l.settings:option:data">
&mvt:option:attr_code;: &mvt:option:data;
<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
&mvt:option:attr_code;: &mvt:option:data_long;
<mvt:else>
&mvt:option:attr_code; </mvt:if>
<br/>
</mvt:foreach>
</div>
<span class="item-code">
<mvt:if expr="l.settings:group:product:sku">
SKU: &mvt:group:product:sku;
<mvt:else>
SKU: &mvt:group:code;
</mvt:if>
Thank you!
Comment