Announcement

Collapse
No announcement yet.

Suivant Attribute Dropdown List

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Suivant Attribute Dropdown List

    Hello

    On attribute dropdown list I have it set to "preload- dropdown list contains select one" but the product page loads and just selects the first option for each attribute while displaying "Please select a valid combination of attributes" in the inventory field.

    Should the dropdown list select the first option when it loads? I think it should say "select option"

    Here is the page http://dev.batondefense.com/ASPBC.html

    #2
    Re: Suivant Attribute Dropdown List

    You need to manually add the select option to the attribute page template:

    Code:
    <mvt:elseif expr="(l.settings:attribute:type EQ 'select') OR (l.settings:attribute:type EQ 'swatch-select')">
    			<mvt:if expr="l.settings:attribute:required">
    				<label for="Product_Attributes[&mvte:attribute:index;]:value" title="&mvt:attribute:prompt;" class="required col-md-4 control-label">&mvt:attribute:prompt;</label>
    			<mvt:else>
    				<label for="Product_Attributes[&mvte:attribute:index;]:value" title="&mvt:attribute:prompt;" class="col-md-4 control-label">&mvt:attribute:prompt;</label>
    			</mvt:if>
    			<div class="col-md-8">
    				<select name="Product_Attributes[&mvt:attribute:index;]:value" id="Product_Attributes[&mvte:attribute:index;]:value" class="form-control">
    				<option value="" selected>Select One</option>
    					<mvt:foreach iterator="option" array="attribute:options">
    						<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 value="&mvte:option:code;" selected>&mvte:option:prompt;</option>
    						<mvt:else>
    							<option value="&mvte:option:code;">&mvte:option:prompt;</option>
    						</mvt:if>
    					</mvt:foreach>
    				</select>
    			</div>
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment

    Working...
    X