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
/* MTBD Product filtering solution * | |
This could all be done in liquid as well | |
Add a product-options id to the fieldset | |
*/ | |
var options = [[], [], [], []]; | |
var optionsFieldSet = document.getElementById("product-options"); | |
var fieldSetInputs = optionsFieldSet.getElementsByTagName("input"); |
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": "mutation publishablePublish($id: ID!, $input: [PublicationInput!]!) { publishablePublish(id: $id, input: $input) { publishable { availablePublicationCount publicationCount publishedOnCurrentPublication } shop { id } userErrors { field message } }}", | |
"variables": { | |
"id": "gid://shopify/Product/{{product.legacyResourceId}}", | |
"input": [{ "publicationId": "gid://shopify/Publication/25658064918" }] | |
} | |
} |
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
{%- assign has_bib = false -%} | |
{%- assign has_jersey = false -%} | |
{%- assign has_bundle = false -%} | |
{%- for item in cart.items -%} | |
{% if item.product.type == 'Bib' -%} | |
{%- assign has_bib = true -%} | |
{%- elsif item.product.type == 'Jersey' -%} | |
{%- assign has_jersey = true -%} | |
{%- endif -%} |
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
<!-- This code will add an item to the cart on button click. --> | |
{%- assign has_bib = false -%} | |
{%- assign has_jersey = false -%} | |
{%- assign has_bundle = false -%} | |
{%- for item in cart.items -%} | |
{% if item.product.type == 'Bib' -%} | |
{%- assign has_bib = true -%} | |
{%- elsif item.product.type == 'Jersey' -%} |
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
/* Customer orders are recieved as "authorized". The number of days left in their trial is passed as a line | |
item prop charge_delay. This cron job checks each hour for any orders that are still in authorized state. | |
If the (order date + charge_delay) is > current date, their trial has ended and we capture payment if | |
they are still have the "Active Subscriber" tag. | |
*/ | |
async function captureUnpaidOrders() { | |
console.log('Debug: Getting unpaid orders'); | |
/* Finds any orders where financial status is authorized. | |
Then checks if the created_at date + the charge_delay is less than the current date. |
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
# ================================ Customizable Settings ================================ | |
# ================================================================ | |
# Tiered Discounts by Quantity | |
# | |
# A list of discount tier offers where: | |
# - 'product_selector_match_type' determines whether we look for | |
# products that do or don't match the entered selectors. Can | |
# be: | |
# - ':include' to check if the product does match | |
# - ':exclude' to make sure the product doesn't match |
OlderNewer