Skip to content

Instantly share code, notes, and snippets.

View stefbowerman's full-sized avatar

Stefan Bowerman stefbowerman

View GitHub Profile
<!-- In your webpage, each response should take the form of: -->
<section>
<h3>Prompt ##</h3>
<div>
Your code goes here...
</div>
</section>
import Utils from '../utils';
import BaseSection from './base';
const selectors = {
list: '[data-stockists-list]'
};
export default class StockistsSection extends BaseSection {
constructor(container) {
super(container, 'stockists');
{%- comment %}
Product Section Display Block ID
------------------------------------------------------------------------------
Usage:
{% include 'product-section-display-block-id.liquid',
product: product,
blocks: section.blocks
{% assign product_tag_string = product.tags | join: ' ' | handle | replace: '-', '' %}
{% unless product_tag_string contains 'hide-tagline' %}
{% capture display_block_id %}
{% include 'product-section-display-block-id', product: product, blocks: section.blocks %}
{% endcapture %}
{% assign display_block_id = display_block_id | plus: 0 %}
{% for block in section.blocks %}
# This file contains the information needed for Shopify to authenticate
# requests and edit/update your remote theme files.
#
# 1. Set up a private app (https://help.shopify.com/api/guides/api-credentials#generate-private-app-credentials)
# with "Read and write" permissions for "Theme templates and theme assets".
# 2. Replace the required variables for each environment below.
#
# password, theme_id, and store variables are required.
#
# For more information on this config file:
/**
* AJAX Cart scripts
* ------------------------------------------------------------------------------
*
* This is a bare-bones but completely usable implementation of an AJAX enabled cart
*
* Usage: slate.AjaxCart.init(options);
*
* See the following list of stubbed / incomplete methods that need to be filled in
{
"data":{
"total_price":40000,
"original_total_price":40000,
"total_discount":0,
"total_weight":0,
"note":"ALL SALES FINAL NO RETURNS OR MODIFICATIONS",
"item_count":4,
"items":[
{
import axios from 'axios';
export default class CartAPI {
constructor() {
}
getCart() {
return axios.get('/cart?view=json')
}
{
"token":"f3984d3fcd789aceadb5174aca2f9fcb",
"note":null,
"attributes":{
},
"original_total_price":60000,
"total_price":60000,
"total_discount":0,
"total_weight":0.0,
{
"id":1889068613730,
"title":"Bike Shorts",
"handle":"bike-shorts",
"description":"\u003cmeta charset=\"utf-8\"\u003e\u003cspan\u003eMaterial: 91% cotton 9% elastane\u003c\/span\u003e",
"content":"\u003cmeta charset=\"utf-8\"\u003e\u003cspan\u003eMaterial: 91% cotton 9% elastane\u003c\/span\u003e",
"vendor":"doubledaycartwright",
"type":"",
"tags":[