AbanteCart Community

AbanteCart Development => Extensions and Add-Ons => Payment Modules => Topic started by: tux on November 07, 2015, 02:17:51 AM

Title: Need to Configure Cash On delivery Feature depending on the amount
Post by: tux on November 07, 2015, 02:17:51 AM
Hello Admin,

Is it possible to configure Cash On Delivery (COD)feature depending on the transaction amount ?

Example : if the transaction amount is less than INR 2500, need to Charge INR 50 per transaction as COD rate. If the transaction amount is greater than INR 2500, need to charge  2% of the transaction amount as COD rate.
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: tux on November 10, 2015, 02:45:30 AM
Why no reply for this post ?
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: yonghan on November 10, 2015, 03:12:31 AM
Hi, a.f.a.i.k there is no such feature on default extension. You need to modify the extension.
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: tux on November 17, 2015, 07:16:28 AM
Hi Abantecart,

Please help me which file we can edit and where should we edit to solve this issue.

Is it possible to configure Cash On Delivery (COD)feature depending on the transaction amount ?

Example : if the transaction amount is less than INR 2500, need to Charge INR 50 per transaction as COD rate. If the transaction amount is greater than INR 2500, need to charge  2% of the transaction amount as COD rate.

Thanking you.

Tux
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: eCommerce Core on November 17, 2015, 07:44:04 AM
You can set up min and max limits for any payment. There is not way to add surcharge for specific payment.
You can use fee total type to apply surcharge to the order, but if you need it to apply to specific payment, some programming will be needed.
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: tux on November 17, 2015, 07:56:00 AM
Hi Admin,

For using a conditional check which php file we can use for COD?
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: eCommerce Core on November 17, 2015, 08:04:36 AM
You need to look in to core/lib/cart.php function getFinalTotal

Correct way to do this is to create a new total extension that will calculate surcharge based on conditions you need.

getFinalTotal will give you an idea how total is constructed.
Title: Re: Need to Configure Cash On delivery Feature depending on the amount
Post by: tux on November 17, 2015, 10:32:20 AM
Thank you. I'll try