Ask your WordPress questions! Pay money and get answers fast! (more info)

Add custom field to WooCommerce's "Cash on Delivery" gateway

  • REFUNDED

Hello there, how are you?

I'd like to add a custom field to the Cash On Delivery payment gateway option of WooCoomerce.
It should apper just when it's selected, bellow its description, like shown in the image attached.
The value that the client should put in this field is any number that's above the total of the order.

The value the client typed in this input should be shown in the order email.

Thank you, have a great day.

Answers (3)

2014-01-27

Arnav Joy answers:

please check this link , i do not know if it will work for you or not , not tested it yet

http://www.mrova.com/woocommerce-add-extra-fee-option-to-payment-gateways/


Henrique Foletto comments:

Thank you for the reply! Sorry but that's not what I'm looking for.
Let me explain better: The client order something that costs $44.35, but he doesn't has this exact money, he has $50, so he would like to give the $50 on delivery a receive back $5.65. So he would type "50" in this field.
Get it?
Thank you again.

2014-01-27

Fahad Murtaza answers:

This should help

http://milos.djekic.net/adding-custom-data-to-woocommerce-orders/


Fahad Murtaza comments:

Also, this is the basic documentation you need to get an extra field in checkout.

http://docs.woothemes.com/document/tutorial-customising-checkout-fields-using-actions-and-filters/


Henrique Foletto comments:

Hey! Thank you.

I tried this plugin, but it has a lot of erros, really weird, maybe it's because of wordpress 3.8?


Fahad Murtaza comments:

Hmm

I wish I had more time to research/ develop this for you. I am well aware of the requirement as this is the prime form of ecommerce available in UAE and Pakistan.

2014-01-27

Gabriel Reguly answers:

Olá Henrique,

The word you are looking for is not exchange, but change.

Can you afford a bigger prize, like $100?

Abraços,
Gabriel


Henrique Foletto comments:

Oh, right, it should be change.

I could increase the prize if you can really do it, however 100 USD is somewhat high for me.

I think you understood what I want since you're brazilian as well and know this kind of service.

Thank you.


Gabriel Reguly comments:

Olá Henrique,

Ok no worries, $100 would be a minimal value to build a new custom COD gateway with the extra field.

Since you can't afford that, I would suggest you to add the information at the 'Descrição' field of COD.

"
Pague em dinheiro na entrega.

Informe nas 'notas do pedido' o valor para o qual devemos enviar o troco.

Por exemplo, se vais pagar um pedido de R$ 37,50 com uma nota de R$ 50,00, informe R$ 50.
"

It will not restrict the client from not filling in the information, but at least will inform him about it.

Abraços,
Gabriel


Henrique Foletto comments:

Hi!

Sent you a PM.
Thank you.


Gabriel Reguly comments:

Olá Henrique,

Follows an image of the configuration change.

Abraços,
Gabriel