Developer forum

Forum » Ecommerce - Standard features » Gift Card vs Voucher Code in Database

Gift Card vs Voucher Code in Database

Nuno Aguiar
Reply

Hi,

 

We are submitting GiftCards and VoucherCodes in different fields (EcomOrderGiftCardCode and EcomOrderVoucherCode), but in the database they seemed to be stored in the same column.

 

We figured that when using Integration and did not notice the difference. How can we tell? Shouldn't we have 2 seperate columns for it?

 

Best Regards,

Nuno Aguiar


Replies

 
Jonas Krarup Dam
Reply

Hi Nuno,

if you submit them in the same field, there is no way to differentiate between them.

You can use two different columns for them - the Giftcards need to be in the field you describe, in the database, but you can choose any custom order field for your voucher codes.

This is done when setting up the discount in the discount matrix

As you can see, I pick which field to use, and which voucher list is valid for the selected discount.

 

Hope this helps,

/Jonas

 

 

 
Nuno Aguiar
Reply

Hi Jonas,

 

Thank you, that helped me understand the situation. Then I think we found a bug:

  • The EcomOrderVoucherCode field (in the template) relates to the Default Voucher Code Field in the Discounts
  • The EcomOrderGiftCardCode field (in the template) does not have a direct match in the Discounts (which I was expecting since it's a standard DW field)
  • The biggest problem is that for custom order fields, I have no option to select if the code comes from a Voucher list

 

I am using 8.8.1.9. Can you reproduce it?

 

Best Regards,

Nuno Aguiar

 
Jonas Krarup Dam
Reply

Hi Nuno,

 

It is true that the templates we distribute for vouchers and giftcards use the same field. You will have to customize your templates if you want them to use different fields.

I'm not sure what you mean about eh EcomOrderGiftCardCode field missing a reference to a discount. Gift cards doesn't have anything to do with discounts. Am I misunderstaning something here?

Also, I'm not sure what you mean by "having the option to selct if the code comes from a voucher list" - you define in your discounts if codes in a costum field should be checked against voucher codes for a given voucher list during checkout. after the order is placed, you can see on your order (either in the back end, or via the API) if a voucher discount has been added to your order.

If that is not what you mean, I need a more detailed description of the problem you are trying to solve.

 

Regards, Jonas

 

 

 
Nuno Aguiar
Reply

Hi Jonas,

 

I made a mistake explaining it. I confused myself with discounts, sorry cheeky

And I just noticed we are using 8.8.1.9 and there was a bug fix for Gift cards in 8.8.1.12

 

I cannot upgrade yet because of another bug related to the override parameter values on the paragraph (Product Catalogue - using Repository) which makes it unusable.

 

So I will retest (look as to where the gift card code is stored in the database) once we upgrade, unless you can confirm that the issue was fixed in that upgrade (we are noticing the gift card code never gets saved to the database).

 

Best Regards,

Nuno Aguiar

 
Jonas Krarup Dam
Reply

Hi Nuno,

Since I'm still not quite sure what the issue is, I am unable to confirm that it was fixed :-)

If your retesting is still causing you problems, let me know, and we'll see what we can do.

 

/Jonas

 
Viktor
Reply

Hi,

 

After some research I remembered the way giftcard codes stored in db.

When you adding code to the order - new orderline is created, and the code is stored in the orderline table within related orderline "OrderLineGiftCardCode".

 

BR, Viktor.

 
Scott Forsyth
Reply

Hi Viktor,

That makes sense, especially since it could support multiple gift certs for partial payments. I didn't notice this when I was working on it, but since you mentioned it, I'll look specifically for the orderline for it.

Thanks!

Scott

 

You must be logged in to post in the forum