Jump to content

No show hasError ajax errors in my Prestashop 1.7.6


DiegolPerez

Recommended Posts

Hi community,

I'm working with prestashop 1.7.6 with classic theme.

I'm working in processChangeProductInCart() function of CartController.php, for my own functionality but the errors notifications of this controller not show in my store, for example this error of availability of product:

        if ('update' !== $mode && $this->shouldAvailabilityErrorBeRaised($product, $qty_to_check)) {
            $this->{$ErrorKey}[] = $this->trans(
                'The item %product% in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted.',
                array('%product%' => $product->name),
                'Shop.Notifications.Error'

            );
        }

 

In debug mode of Firefox in JSON response I get it:

{"JSON"

:{"hasError":true,"errors":["The item Mug the best in your cart is no longer available in this quantity. You cannot proceed with your order until the quantity is adjusted."],"quantity":5000}

}

but not show error notification in store, how do I show this errors in my store? or its a bug?

 

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...