Skip to content

Instantly share code, notes, and snippets.

View thenexus00's full-sized avatar

Liam Dilley thenexus00

View GitHub Profile
@thenexus00
thenexus00 / 0_reuse_code.js
Created October 15, 2013 23:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@thenexus00
thenexus00 / recently-viewed-products.tpl
Created October 19, 2014 22:39
Recently Viewed Products in BC
<div class="recent-product" title="{{name}}">
{tag_name_nolink}
<span>
<img src='{{smallImage}}?Action=thumbnail&amp;Width=100' /><br/>
<a href="{tag_itemurl_nolink}" onclick="AddToCart({tag_catalogueid},{tag_productid},'',4,'','',true);return false;" class="btn btn-primary">Buy</a>
<a href="{tag_itemurl_nolink}" class="btn btn-default" title="view">View</a>
<br/><br/>
</span>
</div>
@thenexus00
thenexus00 / order_registration-AU.html
Created October 19, 2014 22:44
Sign up to different campaigns by detecting what is in the cart
{module_shoppingcartsummary direction="vertical" collection="cartProducts" template=""}
{%if cartProducts.itemCount != 0%}
{% assign isCleanLean = false %}
{% assign isGoodGreenStuff = false %}
{% for collection in cartProducts.items %}
{% if isCleanLean == false and collection.name contains 'Clean Lean' %}
{% assign isCleanLean = true %}
{% endif %}