Jump to content

Add delevery type in cart.tpl


Recommended Posts


I am looking for a possibility to add the type of delivery defined by default in my Prestashop 1.7.

Here is an example. I want to make click n collect appear.  I manage in front but not really in dev.

Thank you for your help


Link to comment
Share on other sites


Hello, I advanced a little but...

I think we need to modify cart-detailled-total.tpl. And add a variable that specifies the type of delivery (Click n Collect / Home / Relay point ...).

I think it's this variable: {$ carrier.name}, but how can I use it in this *.tpl ?

Any help is appreciated Thank you


Link to comment
Share on other sites


In cartController.php I defined a new instance:

public function initContent()
$carrier = new Carrier(1);//I want here the Id of the carrier

      'cart' => $presented_cart,
      'static_token' => Tools::getToken(false),
      'myCarrier'=> $carrier,

And in cart-detailled-total.tpl :

  {* PAM *}
    {if $subtotal.type === 'shipping'}
  {* PAM *}

So now I would have wanted to define the carrier ID in the initcontent function. Is it possible ?

Thks !!!

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...