wstar Posted April 8, 2016 Share Posted April 8, 2016 (edited) Having trouble getting the cart ID for the current user in a module I'm creating. Currently, I'm getting the product being viewed by $productID = (int)Tools::getValue('id_product'); However, Im trying the following code and not getting anything. All variables are empty. $context = Context::getContext(); $cartID = Context::getContext()->cart->id_cart; $cartID2 = Tools::getValue('id_cart'); $cartID3 = $this->context->cart->id_cart; $cartID4 = (int)$context->cookie->id_cart; $shopID5 = Shop::getContextShopID(); Any suggestion? Edited April 8, 2016 by wstar (see edit history) Link to comment Share on other sites More sharing options...
roja45 Posted April 8, 2016 Share Posted April 8, 2016 $this->context->cart->id 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