nosnevetzy Posted February 21, 2018 Share Posted February 21, 2018 (edited) Hello. I'm having an issue about the id_cart on the Cookie/Context object. I have a custom payment module that needs to access the Cookie/Context object from Prestashop in order to validate the order. Below is when I print the cookie object after purchasing an item on the shop that I'm working on. You can see that the id_cart is missing. This is also happening only when the customer already visited/purchased an order to the shop. If the shop was visited for the first time, the id_cart is in the object, but when you try to purchase an order again, the id_cart is missing. I already cleared the cache from the adminpanel and even in the FTP files and I also disable it for a while to test if its the cache that causing the problem but I still facing the issue. Note that since this is a payment module, the order wasn't created yet so the cookie/context object is the only reference to get the cart_id. Below is the sample code in my custom payment module that calls the global cookie object and get the id_cart. It was the first time I encountered this issue. Everything is working fine before. Please share your insights on this issue. It would be a big help for me. Thanks! Edited February 21, 2018 by nosnevetzy (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now