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
payment_gateways = ["Afterpay", "BitPay"] # Gateways to hide | |
tag = "lowstock" # Tag to look for | |
lowStockVariantIDS = [] # Will contain variant ID's of low stock items | |
# Loop over line items to check if any have low stock tag. | |
# If product doeshave tag, add it to our lowStockVariantIDs array. | |
Input.cart.line_items.each do |item| | |
#Note: this won't be very efficient for products with lots of tags | |
item.variant.product.tags.each do |tag| |
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
<title> | |
{{ page_title }}{% if current_tags %}{% assign current_tags_joined = current_tags | join: ', ' %} – {{ 'general.meta.tags' | t: tags: current_tags_joined }}{% endif %}{% if current_page != 1 %} – {{ 'general.meta.page' | t: page: current_page }}{% endif %}{% unless page_title contains shop.name %} – {{ shop.name }}{% endunless %} | |
</title> |
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
{% comment %} Renders gift with purchase products that merchant selects {% endcomment %} | |
<style> | |
.gallery__item:hover { | |
cursor: pointer; | |
} | |
</style> | |
<script> | |
function addToCart(variant_id) { |
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
/* 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. |
OlderNewer