Jump to content

1.7.6.9 : How to find the id of the current carrier


visual

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...