This file contains 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
query { | |
products(first: 10, query: "(id:1234567890) OR (id:0987654321)") { | |
edges { | |
node { | |
title | |
id | |
} | |
} | |
} | |
} |
This file contains 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
query { | |
productByHandle(handle: "protein-juice-cleanse") { | |
id | |
title | |
requiresSellingPlan | |
sellingPlanGroups(first:1) { | |
edges { | |
node { | |
sellingPlans(first: 6) { | |
edges { |
This file contains 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
query productCollection($handle: String!, $firstProducts: Int!, $metafield: String!) { | |
collectionByHandle(handle: $handle) { | |
id | |
title | |
productsCount { | |
count | |
} | |
products(first: $firstProducts) { | |
edges { | |
node { |
This file contains 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 %} | |
Shopify Placeholder SVGs | |
Outputs every Shopify placeholder_svg_tag available. A simple reference to use during theme development. | |
https://shopify.dev/docs/api/liquid/filters/placeholder_svg_tag | |
{% endcomment %} | |
{%- liquid | |
assign outline_illustrations = 'product-1,product-2,product-3,product-4,product-5,product-6,collection-1,collection-2,collection-3,collection-4,collection-5,collection-6,lifestyle-1,lifestyle-2,image' | |
assign color_illustrations = 'product-apparel-1,product-apparel-2,product-apparel-3,product-apparel-4,collection-apparel-1,collection-apparel-2,collection-apparel-3,collection-apparel-4,hero-apparel-1,hero-apparel-2,hero-apparel-3,blog-apparel-1,blog-apparel-2,blog-apparel-3,detailed-apparel-1' |
This file contains 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
""" | |
Metafields: | |
- reviewscouk.single_line_text_field | |
- reviewscouk.number_integer | |
- reviewscouk.static_product_widget | |
""" | |
{ | |
productByHandle(handle: "your-product-handle") { | |
title |
This file contains 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 { json } from "@remix-run/node"; | |
import { | |
Page, | |
Layout, | |
Text, | |
BlockStack, | |
ResourceList, | |
ResourceItem, | |
Thumbnail, | |
Badge, |
This file contains 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 { json } from "@remix-run/node"; | |
import { Page, Layout, BlockStack } from "@shopify/polaris"; | |
import { authenticate } from "../shopify.server"; | |
import { useLoaderData } from "@remix-run/react"; | |
export const loader = async ({ request, params }) => { | |
const handle = params.handle; | |
const { admin } = await authenticate.admin(request); | |
const response = await admin.graphql( |
This file contains 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
<!DOCTYPE html> | |
<html lang="{{ locale }}" dir="{{ direction }}" class="{{ checkout_html_classes }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, minimum-scale=1.0, user-scalable=0"> | |
<meta name="referrer" content="origin"> | |
<title>{{ page_title }}</title> |
This file contains 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
export function isValidEmail(email: string): boolean { | |
const re = /\S+@\S+\.\S+/; | |
const emailTest = re.test(email); | |
return emailTest; | |
} | |
export function isSecurePassword(password: string): boolean { | |
// TODO: remove this once we are past testing data | |
if (password.includes('testing')) return true; |
This file contains 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 %} | |
Custom template for testing styles applied to RTE content. | |
Remove before deploying to production/publishing your theme. | |
{% endcomment %} | |
<style> | |
/* Styleguide styles */ | |
.docs-title { | |
opacity: 0.5; | |
font-style: italic; |
NewerOlder