// jQuery
$(document).ready(function() {
// code
})
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
// This example was used to pull in variant titles and IDs dynamically | |
// on a custom build of the ReCharge customer portal. | |
// | |
// Feel free to send me an email if you have any questions. | |
// | |
// Kelly Vaughn -- The Taproom Agency | |
// [email protected] | |
// 1. Retrieve product ID in any format | |
const productId = <pathToProductId>; |
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
item = 0 | |
Input.cart.line_items.each do |line_item| | |
product = line_item.variant.product | |
if product.product_type == "Underwear" | |
item+=line_item.quantity | |
elsif product.product_type == "Socks" | |
item+=line_item.quantity | |
end | |
end |
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
// | |
{% assign found = false %} | |
{% for finder in product.collections %} | |
{% if finder.handle == 'name' %} | |
{% assign found = true %} | |
{% endif %} | |
{% endfor %} | |
{% if found == false %} | |
<ul> |
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
#!/bin/ruby | |
require 'shopify_api' | |
# This is an example script for the course "Mastering Shopify Apps" | |
# available at http://gavinballard.com/msa/. You're free to use and | |
# modify this script as desired. | |
# Define authentication parameters. You should update these with the | |
# authentication details for your own shop and private application. | |
SHOPIFY_SHOP='mastering-apps.myshopify.com' |
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
<?php | |
/* | |
Some tips on how best to organize your routes | |
#1 Routes should help you determine what URLs are available in your app, | |
so don't use Route::controller or Route::resource | |
because nobody will have a fucking clue. | |