MaxBecode Posted August 7, 2019 Share Posted August 7, 2019 (edited) Dear fellow Prestashop users and developers, I am attempting to integrate Prestashop in my Drupal site. Currently i am able to create and update a cart from my Drupal project. My question is really simple, if i know the cartId, how do i send my user to his respective cart or order in Prestashop? Both Cart = https://mysite/prestashop/en/cart?action=show and Order = https://mysite/prestashop/en/order will send me to the Cart and Order i created myself in prestashop (i'm assuming this information is stored in a Prestashop Cookie?). Edited August 7, 2019 by MaxBecode (see edit history) Link to comment Share on other sites More sharing options...
MaxBecode Posted August 8, 2019 Author Share Posted August 8, 2019 Ok guys don't panic, i found the answer, in Prestashop/classes/Cookie.php there is a function __set(), in that function there are key value pairs that decide what cart will be shown when you visit Both Cart = https://mysite/prestashop/en/cart?action=show and Order = https://mysite/prestashop/en/order so by setting $this->_content['id_guest'] = json_decode($_COOKIE['guest'], true); $this->_content['id_cart'] = json_decode($_COOKIE['cart'], true); i was able to set a specific cart i wanted to show. 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