Tags/topics: 
2
Answers
Vote up!
0
Vote down!

A way to implement cash on delivery payment (COD)

I Try to Implement cash on delivery payment COD

I want apply a charge for this type of payment

I use the COD module - http://drupal.org/project/commerce_cod

I Create a Product COD but I have not understand how to create the correct rule to add the item in the shopping cart when someone select the method Cash on Delivery

The rule I created is
Event
Calculating the sell price of a product

conditions
Selected payment method comparison
Parameter: Order: [site: current-cart-order], Payment method: Cash on Delivery

Actions
Add a product to the cart

when i debugging the rule i have the error:

The variable or parameter commerce_order is empty.
Unable to evaluate condition commerce_payment_selected_payment_method.

Thanks

Janhu
Asked by: Janhu
on October 30, 2012

Comments

Hallo
I need to add a fee for this payment method (3€)

I've tried everything without success.

For example I went to admin/commerce/config/shipping/calculation-rules
Cash on Delivery=> edit

Event
Calculating a shipping rate

Conditions => Add a condition
Select the condition to add => Selected payment method comparison
Date selector => commerce_order
Value => Cash on Delivery

Actions => add an action
Select the action to add => Data => calculate a value
Date selector => site:current-cart-order:commerce-order-total:amount
Operator => Value +
Input value 2 => 3 (the fee to apply)

Calculation result
Variable label => Cahs on Delivery
Variable name => cahs_on_delivery

Test
The customer buys a product. He performs the steps up to order Review
He Select cash on delivery
Nothing happens at this point.

In Unercar (Drupal 6) when the customer selects "cash on delivery" is added on a line indicates the the tax is applied and the total order is recalculated.

How can I apply the fee for this payment method?
Thanks

- Janhu on April 30, 2013

2 Answers

Vote up!
1
Vote down!

You don't need a rule, you use it just like a payment gateway. You need to enable it before it will show up.

Josh

Josh Miller
Answer by: Josh Miller
Posted: Jan 11, 2013