Jump to content

Cash on delivery - how to add delivery cost ?


Recommended Posts

Hi all, I've a problem : is there a method to add more delivery costs when the client choose to pay with COD Cash on delivery ?

 

We need to add the cost when the client choose the COD payments during the check-out of the order

 

We dont' find where we can put them, sorry.

 

Help !

 

PS

We have 1.4.7 version

Link to comment
Share on other sites

There are two ways to add the cost

 

1. Static price:

 

path: modules/cashondelivery/validation.php in this path we will add static price

 

line no:56 (this for order total)

example: $total = $cart->getOrderTotal(true, Cart::BOTH) + static_price;

 

line no:65 (this for display confirm page)

example: $total = $smarty->assign(array(

'total' => $cart->getOrderTotal(true, Cart::BOTH)+static _price,

'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/cashondelivery/'

));

 

 

2. Dynamic Price:

 

we will customization on modules/cashondelivery/cashondelivery.php

create back end dynamic input access

 

THANK YOU VERY MUCH

 

I also made the same question in the italian forum (we are italian), but here is more full of people ...

a guy answered me to add this module

http://www.prestashop.com/forums/index.php?app=core&module=attach&section=attach&attach_id=57236

 

now we'll see which solution is more "light"

 

THANKS AGAIN !

Link to comment
Share on other sites

  • 2 months later...
  • 3 months later...
  • 7 months later...
  • 2 years later...

Hello all,

I have tested the solution joe shan says but I have a problem, I get "Payment Error" message. I think this happens because I'm not updating the total cost of the order, so in the order mi price is X€ but in the payment the price is X€ + COD fee.

How can I solve this situation? I don't know where I can update the price of the cart. I'm good at development but is the first time I've to edit prestashop code.

I'd like to add an product to the cart with the details of de fee but is not mandatory. I think add the fee to shipment price is ok for me.

Thanks in advantage.

Link to comment
Share on other sites

×
×
  • Create New...