Looking at product.variantsindropdown.xml.config, Look for the following, pretty much top to bottom in the code. Edit note: (Be sure to rename this package and place in your Skins/Skin_#/XmlPackages)
1. In the javascript, look for
Code:
function SetCartVariant(selValue){...}
a. modify the if statement:
Code:
if(selValue=='thedefault' || selValue=='')
and add:
Code:
theForm.addbutton.disabled=true;
b. modify the else statement:
Code:
add theForm.addbutton.disabled=false;
2. Add the following parameter in the Product template. Note: you will want to create the string resource so it can be used as the first option in the drop-down list.
Code:
<xsl:param name="myvariant" select="aspdnsf:StringResource('selectvariant.aspx.1', $LocaleSetting)" />
3. Modify the drop-down list by adding an option that calls your string resource
Code:
<select name="variants" onchange="SetCartVariant(this.value)">
<option value="thedefault">
<xsl:attribute name="selected">selected</xsl:attribute>
<xsl:value-of select="$myvariant" disable-output-escaping="yes" />
</option>
<xsl:apply-templates select="/root/ProductVariants/Variant" />
</select>
4. Replace the AddToCart Form call with the following. (note: this technique was found in another thread in the forums)
Code:
<xsl:variable name="returnhtml" select="aspdnsf:AddtoCartForm(ProductID, $defaultVariant, 1)" /><!--original-->
<xsl:variable name="codelocation" select="'onClick="document.AddToCartForm'"/><!--code to replace-->
<xsl:variable name="jscriptSnippet" select="'disabled="true" name="addbutton" onClick="document.AddToCartForm'"/><!--new code to plug in-->
<xsl:value-of select="concat(substring-before($returnhtml, $codelocation), $jscriptSnippet, substring-after($returnhtml, $codelocation))" disable-output-escaping="yes"/>
5. Finally, comment out (or delete) the "selected" attribute for the default variant
Code:
<option value="{VariantID}">
<!--<xsl:if test="IsDefault=1">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>-->
<xsl:value-of select="$vName" />*-*<xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, $pTaxClassID)" disable-output-escaping="yes" />
</option>