1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed AddToCart javascript marks all buttons as disabled, instead of triggering button

Discussion in 'Resolved Bugs' started by Xon, Jan 19, 2017.

  1. Xon

    Xon New Member Xen Product Manager

    In product_cart.js, ajaxSuccess has access to this.button, by storing it to a local variable this can be projected into the XenForo.ExtLoader, allowing just the button the javascript binds to be disabled.

    ie, change;
    Code:
        $button = $('.AddToCart');
        if (!$button.hasClass('NoDisable'))
        {
         $button.addClass('disabled');
        }
    
    to
    Code:
    $cart = $('.cartOverview');
    var $button = this.button;
    ...
        if (!$button.hasClass('NoDisable'))
        {
         $button.addClass('disabled');
        }
    
     
    Chris D likes this.
  2. Chris D

    Chris D Xen Resources Developer Staff Member Xen Notices

    Made that change for the next release, thanks.
     

Share This Page