Jump to content
Sign in to follow this  

Override CartController n'affiche pas d'erreur

Recommended Posts



J'ai fait un override de la méthode processChangeProductInCart

suivant certaine règle je dois remonter une erreur 

$this->errors[] = $this->trans('Error to display', array(), 'Shop.Notifications.Error');

Dans controllers/front/CartController.php

public function displayAjaxUpdate()

J'ai bien le die hasError qui est exécuté


    'hasError' => true,
    'errors' => $this->errors,
    'quantity' => $productQuantity,

dans modules/ps_shoppingcart/controllers/front/ajax.php

initcontent la action 'add-to-cart' , je n'ai plus cette info pour afficher un meeage spécifique 

if (Tools::getValue('action') === 'add-to-cart') {
    $modal = $this->module->renderModal(


Faut-il remonter l'erreur autrement ?


Share this post

Link to post
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
Sign in to follow this  

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More