Note that there are some explanatory texts on larger screens.

plurals
  1. POMagento product page in IE8: add to cart increments by default value, ignoring quantity field. form.js line 266 errors
    primarykey
    data
    text
    <p>The default form.js file appears to be erroring when "add to cart" is clicked. This prevents the value of the quantity field from correctly being passed. Magento substitutes the default value instead. This script doesn't error and the quantity field works just fine in other browsers.</p> <p>Furthermore, the add to cart button works correctly when I switch back to the default theme. Any ideas on where I should start. does anything here stand out as not being IE8 friendly? I haven't modified any of the add to cart functions, nor the form.js file. </p> <p><strong>Update:</strong> I have a browserstack account. Debugging shows that VarienForm is undefined which throws two "'productAddToCartForm' is null or not an object" errors. Form.js which defines VarienForm is being loaded in the header so it should be available for the inline JS.</p> <p>since you can't see line numbers here is the line in question:</p> <pre><code>this.regionSelectEl.options.add(option); </code></pre> <p>Here is the function:</p> <pre><code>update: function() { if (this.regions[this.countryEl.value]) { var i, option, region, def; def = this.regionSelectEl.getAttribute('defaultValue'); if (this.regionTextEl) { if (!def) { def = this.regionTextEl.value.toLowerCase(); } this.regionTextEl.value = ''; } this.regionSelectEl.options.length = 1; for (regionId in this.regions[this.countryEl.value]) { region = this.regions[this.countryEl.value][regionId]; option = document.createElement('OPTION'); option.value = regionId; option.text = region.name.stripTags(); option.title = region.name; if (this.regionSelectEl.options.add) { this.regionSelectEl.options.add(option); //***this is line 266*** } else { this.regionSelectEl.appendChild(option); } if (regionId==def || (region.name &amp;&amp; region.name.toLowerCase()==def) || (region.name &amp;&amp; region.code.toLowerCase()==def) ) { this.regionSelectEl.value = regionId; } } if (this.disableAction=='hide') { if (this.regionTextEl) { this.regionTextEl.style.display = 'none'; } this.regionSelectEl.style.display = ''; } else if (this.disableAction=='disable') { if (this.regionTextEl) { this.regionTextEl.disabled = true; } this.regionSelectEl.disabled = false; } this.setMarkDisplay(this.regionSelectEl, true); } else { if (this.disableAction=='hide') { if (this.regionTextEl) { this.regionTextEl.style.display = ''; } this.regionSelectEl.style.display = 'none'; Validation.reset(this.regionSelectEl); } else if (this.disableAction=='disable') { if (this.regionTextEl) { this.regionTextEl.disabled = false; } this.regionSelectEl.disabled = true; } else if (this.disableAction=='nullify') { this.regionSelectEl.options.length = 1; this.regionSelectEl.value = ''; this.regionSelectEl.selectedIndex = 0; this.lastCountryId = ''; } this.setMarkDisplay(this.regionSelectEl, false); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload