I implemented this before even finding this post. I did some Javascript validation to make sure they input greater than minimum amount.
Here's what I did. In 3.4.x, I changed the FormValidation at the top of skin1/customer/product.tpl to:
Code:
function FormValidation()
{
{/literal}
{if $javascript_code}
{$javascript_code}
return false;
{else}
if(parseInt(document.orderform.amount.value) >= parseInt(document.orderform.minamount.value))
return true;
else
{literal}
{
{/literal}
alert("{"The quantity you entered was invalid. Please enter the appropriate quantity to add this product to your cart."|replace:"\n":" "|replace:"\r":" "}");
return false;
{literal}
}
{/literal}
{/if}
{literal}
}
and I added this before the other hidden inputs:
Code:
{* BCSE Begin *}
<input type=hidden name=minamount value="{$product.min_amount}">
{* BCSE End *}
FIXED! This should work now if you want to use a text box instead of a quantity drop down box.
Carrie