Robert
Robert

Reputation: 812

Magento - Shopping cart delete item is not working

I have update my store at last version 1.9.2.4 and I have ssl enable, after this my delete button from the shopping cart has stop working. I see in firebug this error:

ReferenceError: coShippingMethodForm is not defined
coShippingMethodForm.submit = function () { at line 655

At that line I have this function:

function getQuote() {
    $jq('#shipping-zip-form').attr('id','shipping-zip-form-ajax');
    var coShippingMethodFormAjax = new VarienForm('shipping-zip-form-ajax');

    **THIS IS THE LINE 655**  coShippingMethodForm.submit = function () {

        var country = $F('country');
        var optionalZip = false;

        for (i=0; i < countriesWithOptionalZip.length; i++) {
            if (countriesWithOptionalZip[i] == country) {
                optionalZip = true;
            }
        }
        if (optionalZip) {
            $('postcode').removeClassName('required-entry');
        }
        else {
            $('postcode').addClassName('required-entry');
        }
        if (this.validator.validate()) {
            this.form.submit();
        }
        console.log(countriesWithOptionalZip.length);
    }.bind(coShippingMethodFormAjax);
}

How I can solve this?

Thank you

Upvotes: 0

Views: 1434

Answers (1)

Sharfaraz Bheda
Sharfaraz Bheda

Reputation: 457

this is your code shown above:

var coShippingMethodFormAjax = new VarienForm('shipping-zip-form-ajax');

Update line 655

FROM

coShippingMethodForm.submit = function () {

TO

coShippingMethodFormAjax .submit = function () {

Upvotes: 1

Related Questions