Skip to content

Instantly share code, notes, and snippets.

View ShayneP's full-sized avatar

Shayne Parmelee ShayneP

View GitHub Profile
@ShayneP
ShayneP / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<h1>{{ section.settings.header }}</h1>
{%- assign count = section.settings.reviews_count | escape -%}
<ul>
{% for i in (1..count) %}
<li>Review number {{ forloop.index }}</li>
{% endfor %}
</ul>
{% schema %}
{
"data": {
"order": {
"id": "gid://shopify/Order/1",
"localizationExtensions": {
"edges": [
{
"node": {
"countryCode": "BR",
"purpose": "TAX",
mutation {
appSubscriptionCreate(
name: "Product Photos PRO"
returnUrl: "https://www.shopify.com"
lineItems: [
{
plan: {
appRecurringPricingDetails: {
price: { amount: 10.00, currencyCode: USD }
interval: ANNUAL
{
"data": null,
"errors": [
{
"message": "access denied",
"locations": [
{
"line": 2,
"column": 3
}
{
"data": null,
"errors": [
{
"message": "Access denied for products field.",
"locations": [
{
"line": 2,
"column": 3
}
mutation {
discountCodeBulkDelete(
ids: [
"gid://shopify/DiscountCodeNode/417076609046"
"gid://shopify/DiscountCodeNode/417076123144"
"gid://shopify/DiscountCodeNode/417076632452"
"gid://shopify/DiscountCodeNode/417074353452"
"gid://shopify/DiscountCodeNode/417012837128"
"gid://shopify/DiscountCodeNode/417712637123"
"gid://shopify/DiscountCodeNode/412361823821"
mutation addDiscount {
orderEditAddLineItemDiscount(
id: "gid://shopify/CalculatedOrder/5678"
lineItemId: "gid://shopify/CalculatedLineItem/121314"
discount: { percentValue: 20, description: "Upsell" }
) {
calculatedOrder {
id
addedLineItems(first: 5) {
edges {
{
shop {
shopPolicies {
body
type
}
}
}
{
products(first: 2, query: "status:draft") {
edges {
node {
id
title
status
}
}
}