Developer forum

Forum » Ecommerce - Standard features » Voucher and Gift Card in same field

Voucher and Gift Card in same field

Aki Ruuskanen
Aki Ruuskanen
Reply

Hi,

I'm trying to figure out how to set up so that I can use ONE field for both Gift Cards and Vouchers. I have tried to look around but without success. 

At the moment i have

<input type="text" name="EcomOrderGiftCardCode" id="EcomOrderGiftCardCode" value="<!--@Ecom:Order.GifTCardCode-->" />

and

<input type="text" name="EcomOrderVoucherCode" id="EcomOrderVoucherCode" value="<!--@Ecom:Order.Customer.VoucherCode-->"/>

which works fine. But, as said, I would need to have the functionality in one field. 

 

Regards / Aki


Replies

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Aki

Sorry, we do not support that.

You might be able to do something that detects the length of the input string and moves it to the right hidden input field.

BR Nicolai

Votes for this answer: 1
 
Aki Ruuskanen
Aki Ruuskanen
Reply

Ålrajt, thanks.

 

/Aki

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Hi

I am facing a similar challange - where giftcard, voucher and cupon code (discount-code) are to be combined in one field, to make it simple for the costumer

Anything new on this mather since this post was posted?

If not, could I not just pass the same value to three different hidden fields (giftcard, voucher and discountcode) - and handle the response from that? If the code matches a giftcard, then the response will be "giftcard added", and so on? Will there be any harm done if the code only matches 1 of the 3 options?

/Hans

 
Nicolai Pedersen
Reply

Hi Hans

No, we do not make any changes in relation to this.

You can add the same code to 3 fields - it will not trigger anything elser, except maybe validation errors if you add those.

BR Nicolai

 
Hans Ravnsfjall
Hans Ravnsfjall
Reply

Ok, thank you 👍🏻

/Hans

 

You must be logged in to post in the forum