Open aykodesmedt opened 3 years ago
Hey @aykodesmedt, have you tried using the following:
let checkout = await this.$shopify.checkout.create();
const giftCardCodes = ['yourGiftCardCodes', 'anotherOne'];
checkout = await this.$shopify.checkout.addGiftCards(checkout.id, giftCardCodes);
It's not document yet, but would add to the documentation / types if it works!
ref: https://github.com/Shopify/js-buy-sdk/issues/770#issuecomment-662959502
Hi @Gomah,
Yes, I've tried that. When I use the code above, I get an array in the checkout appliedGiftCards
, but the subtotal or total of the cart is the same as before adding the gift card.
@Gomah
Hi! Have you been able to figure out something more about how to do this?
@aykodesmedt Didn't get much time to look at it yet, feel free to email me with more details 👍🏻
@Gomah
This code works, but the total
or subtotal
parameters aren't adjusted. You should look at paymentDue
for the remaining amount of money the customer will now have to pay.
Is is currently possible to accept gift cards? A gift card code doesn't seem to work with
addDiscount
.