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.add_to_cart').on('submit', function(event){ | |
| //debugger; | |
| event.preventDefault(); | |
| var postUrl = $(this).attr('action'); | |
| var postData = $(this).serialize(); | |
| //console.log(postData); check what your form posts | |
| $.ajax({ | |
| type: "POST", |
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 countMe = 1 %} | |
| {% for collection in product.collections %} | |
| {% if countMe < 2 %} | |
| {% assign firstCollectionUrl = collection.url %} | |
| {% assign firstCollectionTitle = collection.title %} | |
| {% assign countMe = 2 %} | |
| {% endif %} | |
| {% endfor %} | |
| <a href="{{ firstCollectionUrl }}">{{ firstCollectionTitle }}</a> |
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
| $(document).ready(function(){ | |
| var boldFinder = setInterval(function(){ | |
| if($('.bold_option_swatch').length > 0){ | |
| $('.bold_option_swatch').eq(0).find('.bold_option_value').on('click', function(){ | |
| var clutch_selected = $(this).find('input.sw_607037_276033').attr('data-option_value_key'); | |
| console.log(clutch_selected); | |
| //returns url("...."); | |
| var imgUrl = $(this).find('span.bold_option_value_swatch span').css('background-image'); | |
| //replace the url(" | |
| //console.log(imgUrl.toString().slice(5)); |
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 %} | |
| This file can be added as a snippet and add it anywhere you want to display | |
| {% endcomment %} | |
| <div id="pageheader"> | |
| <div class="util-area"> | |
| <div class="search-box"> | |
| <form class="search-form" action="/search" method="get" _lpchecked="1"> | |
| <i class="icon-mag"></i> | |
| <input type="text" name="q" placeholder="Search" autocomplete="off"> | |
| <input type="submit" value="→"> |
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
| {% for item in cart.items %} | |
| <a class="cart-removal" data-line-id="{{ forloop.index }}" href="/cart/change?line={{ forloop.index }}&quantity=0" rel="{{ item.id }}">Remove Item</a> | |
| {% endfor %} |
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="cart-promo"> | |
| <h2>ENTER A PROMO CODE</h2> | |
| <input type="text" id="devPromo"> | |
| <a href="/checkout?discount=none" id="redemDevPromo">Apply Coupon</a> | |
| </div> | |
| <script> | |
| $(document).ready(function(){ | |
| //listen to the promo button click | |
| $('#redemDevPromo').on('click', function(event){ | |
| //disable the button event |
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
| var current = [1, 2, 3, 4, 7, 8], | |
| prev = [1, 2, 4], | |
| isMatch = false, | |
| missing = null; | |
| var i = 0, y = 0, | |
| lenC = current.length, | |
| lenP = prev.length; | |
| for ( ; i < lenC; i++ ) { |
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
| <script> | |
| $(document).ready(function(){ | |
| /* | |
| STEPS: | |
| 1. Grab the img id from the src on gallery thumb click | |
| 2. loop thru the radio button images and grab the img src | |
| 2a. click the button that's it! | |
| */ | |
| /* |
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
| {% for item in cart.items %} | |
| <div class="mbl-cart-container" id="DevLine-{{forloop.index}}"> | |
| <div class="mbl-quantity"> | |
| <p><i class="fas fa-plus" data-line-id="{{ forloop.index }}"></i></p> | |
| <p class="dev-line-qty" id="Q-{{forloop.index}}">{{ item.quantity }}</p> | |
| <p><i class="fas fa-minus" data-line-id="{{ forloop.index }}"></i></p> | |
| </div> | |
| <div class="mbl-line-image"> | |
| <a href="{{ item.url }}"> |
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 total=0 %} | |
| {%for variant in product.variants %} | |
| {% capture i %}{{ total | plus:variant.inventory_quantity }}{%endcapture%} | |
| {% assign total = i %} | |
| {%endfor%} | |
| Total Stock: {{ total }} |