Skip to content

Instantly share code, notes, and snippets.

View svaustin66's full-sized avatar

Scott Austin svaustin66

View GitHub Profile
@svaustin66
svaustin66 / Galleria Gallery on a Shopify Page
Created June 7, 2017 06:26
Example of a Galleria photo gallery on a page in Shopify
@svaustin66
svaustin66 / Gallery-Liquor.liquid
Created June 7, 2017 06:37
Shopify snippet for a Galleria photo gallery
@svaustin66
svaustin66 / Shopify - All Product Photos
Created June 13, 2017 19:49
This liquid code will list all of the products in a store with links to the product admin page and show all product photos under each product
<h2>All Product Images</h2>
{% for product in collections['all'].products %}
<p><a href="/admin/products/{{product.id}}" target="_blank">{{product.title}}</a></p>
{% for image in product.images %}
<p><img src="{{ image.src | product_img_url: "large" }}"></p>
{% endfor %}
{% endfor %}
@svaustin66
svaustin66 / page-calendar-2.liquid
Created June 20, 2017 17:52
FullCalendar.io example
<script>
jq = jQuery.noConflict(false);
jq(function() {
jq('#calendar').fullCalendar({
// put your options and callbacks here
header: {
left: 'prev today next',
right: 'title'
},
@svaustin66
svaustin66 / Edit Page Link - Shopify
Last active July 28, 2017 00:08
Edit Page Link
@svaustin66
svaustin66 / Store Review Page
Last active July 28, 2017 21:57
Store Review Page
<script type="text/javascript">
// <![CDATA[
var sa_review_count = 20; var sa_date_format = 'F j, Y'; function saLoadScript(src)
{ var js = window.document.createElement("script"); js.src = src;
js.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(js); }
saLoadScript('//www.shopperapproved.com/merchant/XXXXX.js');
// ]]>
</script>
<div id="review_header"></div>
<div id="merchant_page"></div>
@svaustin66
svaustin66 / Shopper Approved Generic Code
Last active July 28, 2017 21:53
Shopper Approved Generic Code
<script type="text/javascript">
var sa_values = { "site":XXXXX }; sa_values['token']="XXXXX";
function saLoadScript(src) { var js = window.document.createElement("script");
js.src = src; js.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(js); }
var d = new Date(); if (d.getTime() - 172800000 > 1483501530000) saLoadScript("//www.shopperapproved.com/thankyou/rate/XXXXX.js");
else saLoadScript("//direct.shopperapproved.com/thankyou/rate/XXXXX.js?d=" + d.getTime());
</script>
@svaustin66
svaustin66 / Edited Code for Shopify Checkout Script
Last active July 28, 2017 22:08
Shopper Approved - Edited Code for Shopify Checkout Script
<!-- ShopperApproved.com START -->
<!---Code For Product Listing--->
<script type="text/javascript">
var sa_products = {};
var itemtitle;
{% for line_item in line_items %}
itemtitle = (function () {/*{{ line_item.title }}*/}).toString().match(/[^]*\/\*([^]*)\*\/\}$/)[1];
sa_products['{{ line_item.sku }}'] = itemtitle;
{% endfor %}
</script>