vercel / sveltekit-commerce Goto Github PK
View Code? Open in Web Editor NEWSvelteKit Commerce
Home Page: https://sveltekit-commerce.vercel.app
License: MIT License
SvelteKit Commerce
Home Page: https://sveltekit-commerce.vercel.app
License: MIT License
We could consider adding https://github.com/xiphux/svimg for handling images, or similar.
Grammar error on 404 page.
Opps can mean something else ๐
Can't believe how much simpler this code is vs your NextJs Commerce! Great job. Might have to learn Svelte now to use this. NextJs Commerce is way too complex.
Okay so, I deployed the project to Vercel. All running. But now that I want to connect my Shopify store, I have troubles finding the API variables that works. I created an App in my store, set the storefront api for VITE_SHOPIFY_STOREFRONT_API_TOKEN and my admin api for VITE_SHOPIFY_API_ENDPOINT. Still, I receive an error when I load the page (err 500). I have a test product in my store. What else I'm missing? Thanks in advance.
Opening an issue around the breaking changes in the latest version of SvelteKit.
index.svelte
-> +page.svelte
context="module"
+server.js
for backendIs there already an advocate at Vercel taking on these template updates? Or is the intent for the community to maintain breaking changes moving forward?
Thanks for any guidance!
In the getAllProducts() function, there is no logic to support Shopify's pagination requirement.
As a result, the store can only search through the first 250 products.
Could be a nice addition ๐
Also another sveltekit commerce site to check out.
Strange enough, if you open your browser in private mode and add the first product "Quarter Zip" to your cart and then within the cart side modal, the buttons (remove / or add more item) don't work. It send requests but do not update the cart value.
First off I appreciate that you've shared this template. It's helped me greatly in setting up a Sveltekit-powered Shopify storefront. That said, it could probably stand for an update soon. The API is still defaulting to /2021-10/
version of the API from October 2021.
Most of the API I've touched has remained the same, but I've been roadblocked the last few days because one key name has changed...
In shopify.js
the addToCart
mutation key variantId
is now merchandiseId
.
Here's the full modification to the function:
export async function addToCart({ cartId, merchandiseId }) {
return shopifyFetch({
query: `
mutation addToCart($cartId: ID!, $lines: [CartLineInput!]!) {
cartLinesAdd(cartId: $cartId, lines: $lines) {
cart {
lines(first: 100) {
edges {
node {
id
quantity
merchandise {
... on ProductVariant {
product {
title
}
}
}
}
}
}
}
}
}
`,
variables: {
cartId: cartId,
lines: [
{
merchandiseId: merchandiseId,
quantity: 1
}
]
}
});
}
Just thought I'd share to help other folks beating their head against a wall like I have the last few days :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.