+comm Posted November 21, 2017 Share Posted November 21, 2017 Hi all, we are trying to develop our first custom module on Prestashop 1.7. We need to execute some code lines just on Cart changes and we are using the hook hookactionCartSave(). All is working fine but we need to avoid to execute this code lines in the Checkout pages (i.e. we don't want to execute the code when somebody changes the Payment Method in the Checkout page). We are wondering if we can get the current state of the cart or something similar in the Cart page and in the Check out page... public function hookactionCartSave($params) { if (!Validate::isLoadedObject($this->context->cart) || !Validate::isLoadedObject($params['cart'])) { return false; } else { $cart_status = "current cart status... or something similar " if($cart_status == "cart-summary"){ // do something } else if($cart_status == "cart-checkout"){ // do Nothing } } } thank you for your help, Link to comment Share on other sites More sharing options...
pe._sca Posted July 5, 2021 Share Posted July 5, 2021 Take a look to checkout_session_data in {{ DB_PREFIX }}.cart table 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