Skip to content

Instantly share code, notes, and snippets.

Avatar

Shopify Partners shopifypartners

View GitHub Profile
View spacing-system-5.scss
@for $space from 0 through $spacing-limit {
$value: $space + rem;
.util-pad {
}
.util-margin {
}
}
View spacing-system-4.scss
@for $space from 0 through $spacing-limit {
$value: $space + rem;
}
View spacing-system-2.scss
$spacing-key: (
"top": "top",
"right": "right",
"left": "left",
"btm": "bottom",
"all": null,
"vert": null,
"horiz": null
);
View relative-pagination.rb
products = ShopifyAPI::Product.find(:all, params: { order: 'inventory_total desc', limit: 250 })
process_products(products)
3.times do
break unless products.next_page?
products = products.fetch_next_page
process_products(products)
end
View pagination-with-since_id.json
{
"products": [
{
"id": 11111,
"title": "Paprika"
},
{
"id": 12345,
"title": "Chili Powder"
},
View Shopify-Webhooks-How-to-Prep-Your-App-This-Black-Friday-Cyber-Monday.js
'use strict';
var AWS = require('aws-sdk');
var sqs = new AWS.SQS();
var crypto = require('crypto');
exports.handler = (event, context, callback) => {
var client_secret = event.client_secret;
delete event.client_secret;
//calculate the hash
View Shopify-Webhooks-How-to-Prep-Your-App-This-Black-Friday-Cyber-Monday.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ShopifyWebhookInput",
"type": "object",
"properties": {
"header": { "type": "string" },
"body": {
"type": "string"
}
}
View Shopify Webhooks: How to Prep Your App This Black Friday Cyber Monday.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ShopifyWebhookInput",
"type": "object",
"properties": {
"header": { "type": "string" },
"body": {
"type": "string"
}
}
You can’t perform that action at this time.