Skip to content

Instantly share code, notes, and snippets.

View ConduciveMammal's full-sized avatar

Liam Merlyn ConduciveMammal

View GitHub Profile
@ConduciveMammal
ConduciveMammal / handlebars-product-item.liquid
Created April 5, 2018 13:12
Recently Viewed Products with Shopify using localStorage.
<div class="product-item__container">
{% raw %}
{{#unless productAvailable}}
<span class="badge soldout">
<span class="badge-label soldout">Sold out</span>
</span>
{{/unless}}
{{#if onSale}}
{{#unless soldOut}}
{
"product": {
"id": "36",
"sku": "BASAMAYABLACKL/XL",
"matrix_id": "1541",
"product_code": "basamayblk",
"name": "Bassaya Amaya Black BlackL/XL",
"description": "Erotic and raunchy two piece set. Halter neck open bra and string in translucent tulle, finished with bows. Available in black (red and white versions also available). All products come packaged in their own branded boxes.",
"description_html": "<p>Erotic and raunchy two piece set. Halter neck open bra and string in translucent tulle, finished with bows. Available in black (red and white versions also available). All products come packaged in their own branded boxes.</p>",
"stock_type": "Discontinued",
{
"product": {
"id": 9527525778,
"title": "Ambrosia Black Gown",
"body_html": "\u003cp\u003eAmbrosia is an extremely luxurious robe made from soft and very comfortable silk satin. This unique robe is designed to please – with a very effective design that features beautiful embroidered floral lace on the neck and sleeves.\u003c\/p\u003e\n\u003cp\u003eNot only is the lace delightful to wear, it is also very innovative and exclusive and looks amazing against the black satin.\u003c\/p\u003e\n\u003cp\u003eThere is also an original finish on the hips, in the form of a diamond-shape with lace to complete the look – a great cut out to show off your sexy tied thong! The robe also features a wonderful length of 3\/4 sleeves.\u003c\/p\u003e\n\u003cp\u003eMatching thong is also included which ties on the sides.\u003c\/p\u003e\n\u003cp\u003eItem comes packaged in a Beauty Night box with a picture presenting the product, which is marked with a hologram from the logo Beauty Night Fashion.\u003c\/p\u003e\n\u003
@ConduciveMammal
ConduciveMammal / jewellery.json
Created January 29, 2018 21:34
Jewellery.json Shopify Products
[
{
"Handle": "14k-wire-bloom-earrings",
"Title": "14k Wire Bloom Earrings",
"Body (HTML)": "<div class=\"product-description rte\" itemprop=\"description\">Sed in metus nec dui consequat vestibulum. In varius pretium nunc, sed bibendum mauris lacinia non. Praesent vel neque ut ligula porttitor vestibulum ac eu erat. Pellentesque quis turpis odio. Etiam auctor laoreet ligula, vel aliquam urna ornare sed. Praesent laoreet diam vitae lectus molestie pulvinar.</div>\n<div class=\"product-description rte\" itemprop=\"description\">\n<ul>\n<li><span>Nullam blandit</span></li>\n<li><span>Vestibulum euismod</span></li>\n<li><span>Nullam venenatis </span></li>\n<li><span>Aenean a magna eros</span></li>\n</ul>\n</div>",
"Vendor": "Supply Dark",
"Type": "Earrings",
"Tags": "Rose Gold",
"Published": "true",
"Option1 Name": "Title",
@ConduciveMammal
ConduciveMammal / collection.liquid
Last active December 23, 2022 12:46
Creating a Grid/List View + Products Per Page Selector in Shopify
// To create functionality that allows Shopify collection pages to switch between grid/list and products per page selectors
// Create four collection templates (Or more if you need), two called collection.grid-12.liquid and collection.grid-24.liquid
// and two called collection.list-12.liquid and collection.list-24.liquid
// In the grid templates, add:
<div class="view-icons">
<span class="view-icon grid-view" data-view="grid-xx">
<span class="icon icon-th"></span>
</span>
<span class="view-icon list-view" data-view="list-xx">