Magento 1.9 custom options not adding to cart -
i've got problem using custom options in magento 1.9.
i options show in front-end. when selected, price re-calculated corectly. but, when add product cart seems lose custom option. price wrong , option found in quote item.
this form script looks like:
<script type="text/javascript"> //<![cdata[ var productaddtocartform = new varienform('product_addtocart_form'); productaddtocartform.submit = function(button, url) { if (this.validator.validate()) { if($j('#_hdnquoteid').length) updatecart($j('#_hdnproductsku').val(), $j('#_hdnquoteid').val(), $j('#qty').val(), $j('.product-options select').val()); else addtocart($j('#_hdnproductsku').val(), $j('#_hdnproductid').val(), $j('#qty').val(), $j('.product-options select').length ? $j('.product-options select').val() : null); } }.bind(productaddtocartform); productaddtocartform.submitlight = function(button, url){ if(this.validator) { var nv = validation.methods; delete validation.methods['required-entry']; delete validation.methods['validate-one-required']; delete validation.methods['validate-one-required-by-name']; // remove custom datetime validators (var methodname in validation.methods) { if (methodname.match(/^validate-datetime-.*/i)) { delete validation.methods[methodname]; } } if (this.validator.validate()) { if (url) { this.form.action = url; } this.form.submit(); } object.extend(validation.methods, nv); } }.bind(productaddtocartform); //]]> </script>
if have other ideas on problem i'll happy post more code.
Comments
Post a Comment