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
import { gsap } from "gsap"; | |
import { ScrollTrigger } from "gsap/dist/ScrollTrigger"; | |
gsap.registerPlugin(ScrollTrigger); | |
export default class ImageSequence { | |
constructor() { | |
this.DOM = { | |
chapterNavigation: ".js-chapter-navigation-wrapper", | |
sequence: ".js-image-sequence", |
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
{%- comment -%} | |
Renders the template name based on the template object. | |
Accepts: | |
- template {Template object} - Template object | |
Usage: | |
<body class="{% render 'template-name', template: template -%}">...</body> | |
{%- endcomment -%} |
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
// Always compare to the docs first: https://shopify.dev/docs/api/ajax/reference/cart | |
// Get the Cart | |
fetch("/cart.js") | |
.then((response) => response.json()) | |
.then((data) => console.log(data)); | |
// Add to Cart | |
let addToCartItem = { | |
items: [ |
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
{%- comment -%} | |
############################################################################### | |
Display Videos From Youtube Channel in Your Shopify Store | |
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' | |
############################################################################### | |
# Paypal Me: https://paypal.me/elghorfimed # | |
# Buy Me A Coffee: # | |
# https://www.buymeacoffee.com/elghorfi # | |
############################################################################### | |
[email protected] |
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
const wishlistApi = async ({req, res, shopifyAccessToken, shopifyDomain, allowedOrigins, metafieldNamespace, metafieldKey}) => { | |
const shopifyAdminConfig = { | |
Accept: 'application/json', | |
'Content-Type': 'application/json', | |
'X-Shopify-Access-Token': shopifyAccessToken, | |
}; | |
const apiVersion = '2022-07' | |
const preparePayload = (query, variables) => ({ | |
query, |
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
{%- comment -%} | |
Expected behaviour: | |
Renders picture element | |
About: | |
Render a responsive image | |
Accepts: | |
- img: {Object} image |
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
{%comment%} | |
################################################## | |
# How To add Coupon Code — Discount Field # | |
# On Shopify Cart Before Checkout # | |
# Without Apps # | |
################################################# | |
# Paypal Me: https://paypal.me/elghorfimed # | |
# Buy Me A Coffee: # | |
# https://www.buymeacoffee.com/elghorfi # | |
############################################# # |
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
<div class="productGrid__formItem"> | |
{%- liquid | |
assign current_variant = product.selected_or_first_available_variant | default: product.variants.first | |
assign current_selling_plan_allocation = current_variant.selected_selling_plan_allocation | |
if current_selling_plan_allocation == nil and current_variant.requires_selling_plan | |
assign current_selling_plan_allocation = current_variant.selling_plan_allocations | first | |
endif | |
assign offer = current_selling_plan_allocation | default: current_variant |
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
{% if product.selling_plan_groups.size > 0 %} | |
<div> | |
<label for="plans">Purchase options:</label> | |
<select name="selling_plan" id="plans"> | |
<option value="">One time purchase</option> | |
{% for variant in product.variants %} | |
<optgroup label="{{ variant.title }}"> | |
{% for allocation in variant.selling_plan_allocations %} | |
<option value="{{ allocation.selling_plan.id }}"> | |
{{ allocation.selling_plan.name }} |
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
<form method="post" action="/cart/add" id="product_form_6149192941727" accept-charset="UTF-8" class="shopify-product-form" enctype="multipart/form-data"><input type="hidden" name="form_type" value="product"><input type="hidden" name="utf8" value="✓"> | |
<label for="upload">Upload Your Logo</label> | |
<input id="upload" type="file" name="properties[_upload]" class="product-form__input"> | |
</form> |
NewerOlder