Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Phil Hawksworth committed Jun 26, 2021
1 parent 2a9ecdd commit 1bd743f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 21 deletions.
5 changes: 1 addition & 4 deletions netlify/functions/add-to-cart.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ exports.handler = async (event) => {
quantity,
merchandiseId
} = querystring.parse(event.body);

console.log( quantity, merchandiseId);


// Add to a shopify cart (creating one if required)
const response = await postToShopify({
query: `mutation { createCart($cartInput: CartInput}) {
cartCreate(input: $cartInput) {
Expand Down Expand Up @@ -66,7 +64,6 @@ exports.handler = async (event) => {

console.log(response);


// Shopify will create a new cart ID if required
const cardId = "DUMMY"

Expand Down
47 changes: 30 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1bd743f

Please sign in to comment.