I have completely built my website. And I hit a snag when I need to display cart information such as amount of products, total price etc..
My objective right now is to detect when a user is logged in on my prestashop site (Version 1.4). and display any cart information if the user has added any items to the cart. on my other website. The prestashop site store.illegear.com
The site I built (full custom code without wordpress or prestashop) support.illegear.com
I managed to call the cookies following instructions from this website (http://informatique-todo.blogspot.com/2011/10/prestashop-cookie-structure.html). But now I'm trying to understand how to use the cart class from prestashop to get what I want... I don't know the name of the variable nor understand the functions fully to know how to use it.
Note that these webpage exist on the same server and cookies do function. But I don't know how to display what I need from the Prestashop other than creating my own SQLi query functions
include_once('pathtoprestashopdir/config/config.inc.php');include_once('pathtoprestashopdir/settings.inc.php');
include_once('pathtoprestashopdir/classes/Cookie.php');
include_once('pathtoprestashopdir/classes/Cart.php');
global $cookie;
$cookie = new Cookie('ps');
$display = getCustomerCarts($cookie->$id_cart);
echo $display;
Note that all my code displays absolutely nothing while print_r($COOKIE) shows some information such as ID... last logged in... etc..
And yes I flush my cookies and cache. Its empty and I log out. When I log in to my prestashop the cookie data appears on both my prestashop and my secondary site.
Try with :
$display = Cart::getCustomerCarts($cookie->$id_cart);
Regards