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 |
---|---|
6 | |
5 | |
5 | |
5 | |
4 |
Learn these 5 things I had to learn the hard way with starting and running my own business
By Kitana Jan 27, 2023Would you love to unleash the unbridled power of the Google Shopping Channel into your sho...
By Gabe Jan 6, 2023How can you turn a hobby into a career? That’s what Emmanuel did while working as a wa...
By Skye Dec 30, 2022