Jump to content

showErrorNextToAddtoCartButton JS function doesn't exist


Jonathan Elias

Recommended Posts

Hi everyone,

I think there is a bug with the handling of an error when adding a product to the cart from the product page.

I'm using PS 1.7.6.7

The request:

cart?token=485bf15c876008a5b33073e5c920606d&id_product=813&id_customization=0&qty=1&add=1&action=update

The ajax response:

{hasError: true, errors: [The error"], quantity: 1}

The response enters in this part of the ps_shoppingcart.js code:

if (event && event.resp && event.resp.hasError) {
    prestashop.emit('showErrorNextToAddtoCartButton', { errorMessage: event.resp.errors.join('<br/>')});
}

It seems that the "showErrorNextToAddtoCartButton" doesn't exist.

I have tried on a freshly installed Prestashop, but I still have the issue.

Anyone knows how to fix this ?

Thanks,

Link to comment
Share on other sites

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...