I will post the code that's used for all the labels and id's below.
Code:
<mvt:assign name="l.settings:attributeID" value="'l-' $ tolower(l.settings:attribute:code)" />
<input type="hidden" name="Product_Attributes[&mvte:attribute:index;]:code" value="&mvte:attribute:code;" data-attribute-type="&mvte:attribute:type;" />
<mvt:if expr="l.settings:attribute:template_code NE 0">
<input type="hidden" name="Product_Attributes[&mvte:attribute:index;]:template_code" value="&mvte:attribute:template_code;" />
</mvt:if>
<mvt:if expr="l.settings:attribute:type EQ 'text'">
<div class="form-row">
<mvt:if expr="l.settings:attribute:required">
<label for="&mvt:attributeID;" title="&mvte:attribute:prompt;" class="required red bold">&mvt:attribute:prompt;
<mvt:if expr="l.settings:attribute:image">
<mvt:if expr="l.settings:attribute:price">
<mvt:if expr="l.settings:attribute:price GT 0">
<mvt:eval expr="'+ $' $ rnd(l.settings:attribute:price, 2)" />
<mvt:else>
<mvt:eval expr="'- $' $ rnd(l.settings:attribute:price, 2)" />
</mvt:if>
</mvt:if>
<a href="&mvte:attribute:image;" title="&mvte:attribute:prompt;" class="button button-mini bg-gray" onclick="return !window.open(this.href,'_blank','toolbar=yes,location=yes,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=375,height=375');">View Image</a>
<mvt:else>
<mvt:if expr="l.settings:attribute:price">
<mvt:if expr="l.settings:attribute:price GT 0">
<mvt:eval expr="'+ $' $ rnd(l.settings:attribute:price, 2)" />
<mvt:else>
<mvt:eval expr="'- $' $ rnd(l.settings:attribute:price, 2)" />
</mvt:if>
</mvt:if>
</mvt:if>
</label>
<mvt:else>
<label for="&mvt:attributeID;" title="&mvte:attribute:prompt;">&mvt:attribute:prompt;
Leave a comment: