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

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

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

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):
  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