Any ideas what's happening?
The rendered code from this exert (product attribute template) seems to be incorrect and I don't see why. This same exact conditional branch of code works for the radio options.
The catch is that the problem does NOT show up in MS Edge. The browser fun continues -- in reverse.
I have to two band-aid fixes that IMO should not be necessary.
For the SELECT attribute type, the options list is generating a
when the condition is true. The result is that Firefox and Chrome render the blank line in the list. So, the logic works as expected right up until the blank is generated. In Edge, there isn't a blank line or it's ignored.
The rendered code from this exert (product attribute template) seems to be incorrect and I don't see why. This same exact conditional branch of code works for the radio options.
The catch is that the problem does NOT show up in MS Edge. The browser fun continues -- in reverse.
I have to two band-aid fixes that IMO should not be necessary.
For the SELECT attribute type, the options list is generating a
<option></option>
Code:
<mvt:elseif expr="l.settings:attribute:type EQ 'select'"> <mvt:comment> Are we hiding and attributes? Get the hide list from the custom field </mvt:comment> <mvt:item name="customfields" param="Read_Product_Code( l.settings:product:code, 'hideattr', g.thisattrcode )" /> <div class="form-row"> <select name="Product_Attributes[&mvt:attribute:index;]:value" id="&mvt:attributeID;" class="input-medium" data-attribute="&mvte:attribute:code;"> <option value="">&mvt:attribute:prompt;</option> <mvt:foreach iterator="option" array="attribute:options"> <mvt:if expr="'|' $ toupper(l.settings:option:code) $ '|' CIN toupper(g.thisattrcode)"> <mvt:foreachcontinue /> <mvt:else> <mvt:if expr="((g.Product_Attributes[l.settings:attribute:index]:value EQ 0) AND (l.settings:option:id EQ l.settings:attribute:default_id)) OR (g.Product_Attributes[l.settings:attribute:index]:value EQ l.settings:option:code)"> <option data-inventory="&mvt:global:attr_exclude;" id="invcontrol_&mvte:product:code;_&mvte:option:code;" value="&mvte:option:code;" data-option-price="&mvt:option:price;" data-regular-price="" selected> &mvte:option:prompt; &mvte:pm:showPricing:select; </option> <mvt:else> <option data-inventory="&mvt:global:attr_exclude;" id="invcontrol_&mvte:product:code;_&mvte:option:code;" value="&mvte:option:code;" data-option-price="&mvt:option:price;" data-regular-price=""> &mvte:option:prompt; &mvte:pm:showPricing:select; </option> </mvt:if> </mvt:if> </mvt:foreach> </select> </div> <mvt:elseif expr="l.settings:attribute:type EQ 'swatch-select'">
Comment