You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am new to sylius and php in generally and I'm having trouble with the redirect after adding to the car. I have followed the cookbook tutorial but not sure what is meant at the end by handling this on the front end?
What I've tried:
I've tried to implement what is set out in the tutorial and set the redirect link to:
sylius-add-to-cart.js
$.each(response.errors.errors, function (key, message) {
validationMessage += message;
});
Uncaught TypeError: Cannot read property 'errors' of undefined
at HTMLFormElement.onFailure (app.js:1363)
at Object.fail (app.js:23)
at i (app.js:2)
at Object.fireWith [as rejectWith] (app.js:2)
at app.js:23
Ideally, i wanted this to happen with no redirect at all and for the cart total to update automatically. However i have tried unsuccessfully to override the sylius-add-to-cart.js file. I have tried to disable the redirect path in both cart.yml and _addToCart.html.twig:
Im at a loss with this now and im considering just doing my own ajax call etc to add to cart but i thought there was a more sylius/symfony way to do this?
Any help will be greatly appreciated.
p.s. i have tried Stack overflow as well.
The text was updated successfully, but these errors were encountered:
Hi,
I am new to sylius and php in generally and I'm having trouble with the redirect after adding to the car. I have followed the cookbook tutorial but not sure what is meant at the end by handling this on the front end?
What I've tried:
I've tried to implement what is set out in the tutorial and set the redirect link to:
However this causes an error in the Javascript:
Ideally, i wanted this to happen with no redirect at all and for the cart total to update automatically. However i have tried unsuccessfully to override the sylius-add-to-cart.js file. I have tried to disable the redirect path in both
cart.yml
and_addToCart.html.twig
:Im at a loss with this now and im considering just doing my own ajax call etc to add to cart but i thought there was a more sylius/symfony way to do this?
Any help will be greatly appreciated.
p.s. i have tried Stack overflow as well.
The text was updated successfully, but these errors were encountered: