Comments (5)
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: Shopify/js-buy-sdk#770 (comment)
from nuxt-shopify.
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.
from nuxt-shopify.
Hi! Have you been able to figure out something more about how to do this?
from nuxt-shopify.
@aykodesmedt Didn't get much time to look at it yet, feel free to email me with more details 👍🏻
from nuxt-shopify.
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.
from nuxt-shopify.
Related Issues (20)
- in nuxt route middlware the response is comming as grphModel and it is not storing in vuex
- Question: How do you handle Shopify product/page updates for static site deployment? HOT 2
- Product filters in queries HOT 1
- An unknown error has occurred HOT 6
- CORS errors on request HOT 1
- Jest: node_modules/nuxt-shopify/lib/module.js HOT 1
- Support for Directives (inContext) HOT 3
- selling_plan_allocations not given in products are variants HOT 1
- Any plans for Nuxt 3 support? HOT 5
- Leaving names blank when updating shipping address breaks
- Adding tags to the checkout so it appears in the Shopify order
- Send cookies to Shopify
- Unable to find `quantityAvailable` on variants – how can I get count stock? HOT 7
- Any way of getting the prices in a different currency?
- Does this module use graphQL?
- Nuxt 3 support HOT 6
- Bump shopify-buy
- Does having a Support plan or Opinion about Metafield of Shopify ? HOT 1
- Nuxt 3 error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-shopify.