Development discussions around Shopify APIs
Hello,
I wonder how to integrate the Shopify Lite's Buy Button on a Nuxt website.
I saw that there is the nuxt-shopify module (https://github.com/Gomah/nuxt-shopify) but is it adapted?
Thanks for your help!
Deodat
For the example, with Snipcart, we can do something like that :
In nuxt.config.js :
head: {
link: [
{
rel: 'stylesheet',
href: 'https://cdn.snipcart.com/themes/2.0/base/snipcart.min.css'
}
],
script: [
{
src: 'https://cdn.snipcart.com/themes/2.0/current/snipcart.js',
id: 'snipcart',
'data-api-key': process.env.SNIPCART_API_KEY
}
]
},
And in a product page :
<button
class="snipcart-add-item"
:data-item-id="blok._uid"
:data-item-name="blok.name"
:data-item-price="blok.price"
:data-item-url="$nuxt.$route.path"
>
Buy {{ blok.name }}
</button>
Is there an equivalent for Shopify Lite?
User | RANK |
---|---|
50 | |
11 | |
5 | |
5 | |
4 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023