Developer forum

Forum » Ecommerce - Standard features » Gift card - History

Gift card - History

Nuno Aguiar
Reply

Hi,

 

How can a frontend user know how much is available on his gift card? Is there a module/setting for this?

 

I can find documentation for the backend, but not for templates. If there is none, how can I get the balance and/or history based on a gift card code?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

That can only be looked up when adding the giftcard code on the order.

You can relatively simple do the lookup using the api:

Dynamicweb.eCommerce.GiftCard.GiftCard.getGiftCardByCode(code) and take a look at the Balance property and you can get all the transactions using the Dynamicweb.eCommerce.GiftCard.GiftCardTransaction.GetTransactionsForGiftCard and iterate through that collection.

Votes for this answer: 1
 
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks, that helps.

 

Best Regards,

Nuno Aguiar

 

You must be logged in to post in the forum