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
jQuery( document.body ).trigger( 'wc_fragment_refresh' ); |
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 %} | |
Reach author at [email protected] for any queries! | |
{% endcomment %} | |
<div class="devTopbar center"> | |
<p>{{ section.settings.dev-top }}</p> | |
</div> | |
<style> | |
.devTopbar.center p { | |
color: #fff; |
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
// 1. Enter sheet name where data is to be written below | |
var SHEET_NAME = "Sheet1"; | |
// 2. Run > setup | |
// | |
// 3. Publish > Deploy as web app | |
// - enter Project Version name and click 'Save New Version' | |
// - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously) | |
// | |
// 4. Copy the 'Current web app URL' and post this in your form/script action |
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
/*General*/ | |
.vertically-top{ | |
vertical-align: top; | |
} | |
.vertically-center{ | |
vertical-align: center; | |
} | |
.vertically-bottom{ | |
vertical-align: bottom; | |
} |
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 available_ids = []; //array of 'varaint_id - qty' | |
//the following loop was for my case, you need to change the DOM selector for yours | |
$('.devTable tbody tr').each(function(){ | |
var thisQty = $(this).find('.devQty input').val(); | |
if(thisQty > 0){ | |
var xVarID = $(this).find('.devQty input').attr('data-value'); | |
var toPushItem = xVarID+'-'+thisQty; | |
available_ids.push(toPushItem); | |
} | |
}).promise().done( function(){ |
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 id="variant-inventory" class="devst-variant-inventory"> | |
{% if product.variants.first.inventory_management == "shopify" %} | |
{% if product.variants.first.inventory_quantity > 0 %} | |
{% if product.variants.first.inventory_quantity > 10 %} | |
{% assign hideValue = 'none' %} | |
{% else %} | |
{% assign hideValue = 'block' %} | |
{% endif %} | |
<span id="qtyLogic" style="display:{{ hideValue }}"> | |
Only <span class="devStock">{{ product.variants.first.inventory_quantity }}</span> left! |
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 product in collections[product.handle].products %} | |
{{ product.title }} | |
{% 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
{% comment %} | |
Add this snippet to your snippets folder and then include it at the very bottom of your theme.liquid right before </body> | |
The following script using fancybox app script. If your theme already has it in your theme, you can delete the fancy apps scripts. | |
{% endcomment %} | |
{% if template.name == 'index' %} | |
<!-- Fancy apps Scripts --> | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.css" /> | |
<script src="https://cdn.jsdelivr.net/gh/fancyapps/[email protected]/dist/jquery.fancybox.min.js"></script> |