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> | |
| var create_callback = function(data) { | |
| if (data.status == 'OK') | |
| { alert(data.message) } | |
| else { | |
| var msg = []; | |
| for (var i in data.errors) { | |
| msg.push(data.errors[i]); | |
| } | |
| alert(msg.join("\n")); |
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
| /* | |
| * Example code only | |
| * This code has not been tested on a live site | |
| * | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, | |
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| * AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
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
| /* | |
| * Example code only | |
| * This code has not been tested on a live site | |
| * | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| * IMPLIED, INCLUDING BUT NOT LIMITED TO THE * WARRANTIES OF MERCHANTABILITY, | |
| * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| * AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
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
| <!-- Updating the product.liquid HTML to have a hidden Notify Me button --> | |
| <!-- START BUY --> | |
| <div id="buy" class="clear"> | |
| <h2 id="price"><span>$135.00</span></h2> | |
| <input class="button" type="submit" id="add" value="Buy Now" /> | |
| <a href="#" id="notifyme">Notify when available</a> | |
| </div> | |
| <!-- END BUY --> |
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
| <a href="#" id="BIS_trigger">Notify me when available!</a> | |
| {% if product.available %} | |
| <style>#BIS_trigger { display: none; }</style> | |
| {% endif %} |
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 selectCallback = function(variant, selector) { | |
| if (variant && variant.available == true) { | |
| // selected a valid variant | |
| jQuery('#add-to-cart').removeClass('disabled').removeAttr('disabled').val('Add to Cart'); // remove unavailable class from add-to-cart button, and re-enable button | |
| if(variant.price < variant.compare_at_price){ | |
| jQuery('#price-preview').html(Shopify.formatMoney(variant.price) + " <span>was " + Shopify.formatMoney(variant.compare_at_price) + "</span>"); | |
| } else { | |
| jQuery('#price-preview').html(Shopify.formatMoney(variant.price)); | |
| } | |
| jQuery('#BIS_trigger').hide(); // This line added for Back In Stock app |
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() { | |
| $('#notify_button').click(function(event) { | |
| event.preventDefault(); | |
| BISPopover.create($('#notify_email').val(), $('#product-select :selected').val()); | |
| }); | |
| }); |
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 selectCallback = function(variant, selector) { | |
| if (variant && variant.available == true) { | |
| // selected a valid variant | |
| $('#productinfo #detail #purchase').removeClass('disabled').removeAttr('disabled'); // remove unavailable class from add-to-cart button, and re-enable button | |
| var newHtml = Shopify.formatMoney(variant.price, ""); | |
| if(variant.compare_at_price > variant.price) { | |
| newHtml += '<div class="was-price">was ' + Shopify.formatMoney(variant.compare_at_price, "") + '</div>'; | |
| } | |
| $('#price-field').html(newHtml); // update price field | |
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> | |
| $(function() { | |
| $('.notify_form [type=submit]').click(function(e) { | |
| e.preventDefault(); | |
| var variantId = $('select[name=id]').val() || {{ product.variants.first.id }}; | |
| var email = $(this).closest('form').find('[name="contact[email]"]').val(); | |
| var showResponse = function(text) { |
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 create_callback = function(data) { | |
| if (data.status == 'OK') { | |
| $("#inline_message").html('<h3>Thanks</h3> <p>You will receive an email once the item is available.</p>'); | |
| } else { | |
| $("#inline_message").html('<h3>Oops! Looks like an error occurred.</h3> <p>Please check the email address you entered and try again.</p>'); | |
| } | |
| $.fancybox({ | |
| 'href': '#inline_message' | |
| }); |