This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const wishlistApi = async ({req, res, shopifyAccessToken, shopifyDomain, allowedOrigins, metafieldNamespace, metafieldKey}) => { | |
const shopifyAdminConfig = { | |
Accept: 'application/json', | |
'Content-Type': 'application/json', | |
'X-Shopify-Access-Token': shopifyAccessToken, | |
}; | |
const apiVersion = '2022-07' | |
const preparePayload = (query, variables) => ({ | |
query, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- comment -%} | |
Expected behaviour: | |
Renders picture element | |
About: | |
Render a responsive image | |
Accepts: | |
- img: {Object} image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { decode } from 'shopify-gid'; | |
const shopifyUrl = 'https://askphill.com' | |
export function useDirectCheckoutItems() { | |
// items is [{quantity: quantity, variantId: 'variantId'}] | |
async function checkoutItems(items) { | |
if (items.length < 1) { | |
throw new Error('Must include at least one line item, empty line items found'); | |
} |