visual Posted December 2, 2020 Share Posted December 2, 2020 Hello I would to find the id of the current carrier in cart either accessible in smarty or in a controller. Thank you for your help. Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2020 Share Posted December 2, 2020 context::getContext()->cart->id_carrier Link to comment Share on other sites More sharing options...
visual Posted December 2, 2020 Author Share Posted December 2, 2020 Thank you for your help but it's return 0 This is my code. class CartController extends CartControllerCore { public function initContent() { parent::initContent(); $shipping_free_price = (float)Configuration::get('PS_SHIPPING_FREE_PRICE'); $transporteur = context::getContext()->cart->id_carrier; $this->context->smarty->assign([ 'shipping_free_price' => $shipping_free_price, 'transporteur' => $transporteur ]); } } Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2020 Share Posted December 2, 2020 check the ps_cart table and the id_carrier value 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