Magento的產品詳情頁有按鈕「添加到購物車」,這不是在IE工作(我在不同版本的測試) 按鈕:Magento。添加到購物車無法在Internet Explorer工作
<button type="button" title="Add to Cart" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span>Add to Cart</span></span></button>
碼在產品頁面:
var productAddToCartForm = new VarienForm('product_addtocart_form');
productAddToCartForm.submit = function (button, url) {
if (this.validator.validate()) {
var form = this.form;
var oldUrl = form.action;
if (url) {
form.action = url;
}
var e = null;
try {
this.form.submit();
} catch (e) {}
this.form.action = oldUrl;
if (e) {
throw e;
}
if (button && button != 'undefined') {
button.disabled = true;
}
}
}.bind(productAddToCartForm);
也稱爲腳本/media/js/d9d0df2fe59a334949de96f1603a1a9b.js
document.observe("dom:loaded", function() {
replaceDelUrls();
replaceAddUrls();
//Event.observe($('j2t-overlay'), 'click', hideJ2tOverlay);
var cartInt = setInterval(function() {
if (typeof productAddToCartForm != 'undefined') {
if ($('j2t-overlay')) {
Event.observe($('j2t-overlay'), 'click', hideJ2tOverlay);
}
productAddToCartForm.submit = function (url) {
if (this.validator && this.validator.validate()) {
sendcart('', 'form');
clearInterval(cartInt);
}
return false;
}
} else {
clearInterval(cartInt);
}
}, 500);
});
我怎麼能解決這個問題錯誤? 我使用magento 1.7.2