Commerce Cash on Delivery with extra fees

Component ID

1941748

Component name

Commerce Cash on Delivery with extra fees

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

This is a fork of the Drupal commerce payment method cash on delivery http://drupal.org/project/commerce_cod with additional functionality for adding a fee line-item if this payment method is chosen.

This feature was requested several times in the original projects issue queue. Here #1364138: COD Fee and here #1871112: Add a extra fee for use this method. The maintainer stated that this is a Won't fix issue as a payment method should not add any extra costs. I partly agree with that - but my customer will not. Also other shop systems do this like that and the alternatives to collect this fee were not an option on the project I needed this for.

Alternatives:

  • A rule that adds a product line-item "Fee"
  • A rule that changes the shipping amount. This might be the proper solution but I have already some shipping amount calculation rules in place an we needed the fee as a separate line-item on the order.

Inspiration

The code for the fee line-item is inspired by the gift wrapping module.
http://drupal.org/project/commerce_giftwrap
and this discussions
#1352524: COD Payment dependent extra shipping fee
http://drupal.stackexchange.com/questions/26557/drupal-commerce-cash-on-...
http://groups.drupal.org/node/192983
http://drupal.stackexchange.com/questions/14668/adding-a-drupal-commerce...

Usage

Goto:
admin/commerce/config/payment-methods/manage/commerce_payment_commerce_cod

Click "Edit" in the "Action" section.

Select the "Collect an extra fee" checkbox

Enter the amount in Minor units into "Amount of the extra fee."