New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CartRule->checkValidity FatalThrowableError #36115
Comments
@Eva-F Hi, can you please provide a clearly reproducible scenario so we can test this? I fixed a very related issue to this - #33954, so I am interested if this isn't maybe also fixed? Something like:
Thanks! |
my sorry - I didn't realized all consequences of placing the condition
should by just before
this way
To @Hlavtox I am not able to describe the exact steps because I am only an external consultant who should try to solve the urgent problems with the eshop. The tricky was that the cookie contained id_cart, which was created say 2 months ago and the related order was not created. Moreover (maybe) here played its role a voucher (here i am not sure) - the error occured thanks the affiliate plugin, that hooks "hookActionCartSave") And yes also ComputingPrecision->getPrecision() error occured before and was patched the similiar way as you did but $cart->update() is called twice in init and our problem cas was related on /* Select an address if not set */ |
Closing the issue as it cannot be reproduce on a native shop |
Prerequisites
Describe the bug and add attachments
when using a plugin that is connected to "hookActionCartSave", we get a FatalThrowableError in the CartRule->checkValidity function for older cookies.
These legacy cookies contain id_cart, which refer to a no longer existing record in table DB_PREFIX.'cart' (table DB_PREFIX.'cart' is periodically deleted by the abandoned cart plugin)
Expected behavior
the problem imho is caused that $context->cart is not set
this simple patch of /classes/controller/FrontController.php solves our problem
change to:
Steps to reproduce
PrestaShop version(s) where the bug happened
1.7.8.11
PHP version(s) where the bug happened
7.3.33
If your bug is related to a module, specify its name and its version
No response
Your company or customer's name goes here (if applicable).
No response
The text was updated successfully, but these errors were encountered: