I would like it when a configurable fee is added, either separate or to shipping, when COD is chosen as payment method. I tried to accomplish this without success with rules.

Comments

bibo’s picture

I also wonder how that should be done.

ñull’s picture

Although as feature would still be nice, you can also do it with a rule. See my post here

vasike’s picture

Status: Active » Closed (won't fix)

thanks ñull for the support

i don't think a payment module should be deal with altering the prices. this is should be a Product Pricing rules matter or maybe a TAX based on the payment solution.

finex’s picture

@vasike: hi, wouldn't be possible to add a line item on the cart with the fee when the cod payment method is selected?
If the fee is fixed you cannot add with a Product Pricing rules nor with a TAX rate. The only way is to add an extra line item with the fixed value. Moreover the solution given by @ñull could work only on specific use cases, but it cannot be applied everywhere (like this case).

Thanks for the attention.

xano’s picture

i don't think a payment module should be deal with altering the prices. this is should be a Product Pricing rules matter or maybe a TAX based on the payment solution.

I disagree. Products are about what you buy. This is about paying for them. Choosing a different payment method should not have any consequences for the products or the line items on the invoice.

You can use Payment to create a payment method that is identical to the payment method that Commerce Cash on Delivery provides, and use Rules to add a line item to the payment when the payment method is COD.

See Configuring "no payment required" payment methods for creating such a payment method with Payment. Enable Payment for Drupal Commerce to use the payment method within Commerce. This approach also allows you to leave payments pending as long as the customer hasn't actually paid yet.