steveosoule
7/30/2015 - 12:01 AM

Miva - Quantity Select Drop Down While Loop

Miva - Quantity Select Drop Down While Loop

<select name="Quantity" class="form-control">

	<mvt:while expr="l.settings:item:quantity_counter LT 10">
		<mvt:assign name="l.settings:item:quantity_counter" value="l.settings:item:quantity_counter + 1" />

		<mvt:if expr="l.settings:item:quantity_counter EQ l.settings:item:quantity">
			<mvt:assign name="l.settings:selected" value="'selected'" />
		<mvt:else>
			<mvt:assign name="l.settings:selected" value="''" />
		</mvt:if>

		<option &mvt:selected;>&mvte:item:quantity_counter;</option>
	</mvt:while>

	<mvt:if expr="l.settings:item:quantity GT l.settings:item:quantity_counter">
		<option selected>&mvte:item:quantity;</option>
	</mvt:if>
</select>