Looking for the v10 manual? Visit our new user's guide!
 
Search Descriptions Version
 
 
This article applies to: ML v7, ML8, MultiStore

Add To Cart javascript error


Symptoms
After installing the Smart MiniCart you receive an error on clicking the Add To Cart button:

Error: ReferenceError: WebForm_OnSubmit is not defined
Source File: https://www.yoursite.com/App_Themes/Skin_1/js/newminicart.js
Line: 156

Cause
There is a conflict with another add-on that causes the WebForm_OnSubmit to be undefined, causing the error to be thrown.

Solution
The following procedure must be performed to update the newminicart.js file:
  1. Edit the file in a text editor for the skin you are having this issue in (/Skin_1 for example):
    www.yoursite.com/App_Themes/Skin_1/js/newminicart.js
  2. Search for "var oldwebformsubmit"
  3. Change the code to this:
  4. //var oldwebformsubmit = WebForm_OnSubmit;
    var oldwebformsubmit = (typeof WebForm_OnSubmit == "undefined") ? 0 : WebForm_OnSubmit;
    var oldformsubmit = form.onsubmit;

  5. Save the file and upload to your site