Skip to content

Instantly share code, notes, and snippets.

View lauraeddy's full-sized avatar

Laura Eddy lauraeddy

View GitHub Profile
@lauraeddy
lauraeddy / Facebook - Setup comments with notifications
Created November 26, 2015 02:29
Facebook: Setup comments with notifications (Business Catalyst) og parameters
Make sure you have the clients login details (they will recieve the notifications)
1. Create a new app (website): https://developers.facebook.com/apps
Name: XXX Comments
Category: Communication
Add in website url
Don't need to do next steps as code is below
2. Add the following into the detail view
<div class="fb-comments" data-href="{{url}}" data-width="100%" data-numposts="5" data-colorscheme="light"></div>
@lauraeddy
lauraeddy / Dropdown options based on another dropdown.html
Created November 26, 2015 02:27
Dropdown options based on another dropdown
<label for="CAT_Custom_366914">State<span class="req">*</span></label>
<select name="CAT_Custom_366914" id="CAT_Custom_366914" class="form-control select-state">
<option value=" ">-- Please select --</option>
<option value="act">ACT</option>
<option value="nsw">NSW</option>
<option value="nt">NT</option>
<option value="qld">QLD</option>
<option value="sa">SA</option>
<option value="tas">TAS</option>
<option value="vic">VIC</option>
@lauraeddy
lauraeddy / Dropdown - auto select subcategories based on category select.html
Created November 26, 2015 02:26
Dropdown - auto select subcategories based on category select
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<label for="CAT_Custom_366914">1. Select state<span class="req">*</span>
</label>
<select name="CAT_Custom_366914" id="CAT_Custom_366914" class="form-control select-state">
<option value=" ">-- Please select --</option>
<option class="nsw" value="nsw">NSW</option>
<option class="qld" value="qld">QLD</option>
<option class="sa" value="sa">SA</option>
<option class="vic" value="vic">VIC</option>
@lauraeddy
lauraeddy / Form - Dropdown select, change amount.html
Created November 26, 2015 02:26
Form - Dropdown select, change amount
<select class="cat_dropdown" id="CAT_Custom_367958" name="CAT_Custom_367958">
<option value=" ">-- Please select --</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select>
<div class="amount" style="display: none;">150</div>
@lauraeddy
lauraeddy / Liquid - If shopping cart is empty.html
Created November 26, 2015 02:25
Liquid - If shopping cart is empty
{% if {{globals.cart.itemCount}} == null %}
<div class="cart-summary empty">
<div class="cart-summary">Your cart is empty</div>
</div>
{% else %}
<div class="cart-summary not-empty">
<div class="cart-summary pull-left">
{{itemCount}} item(s), Total {{currencyFormat}}{{totalAmount}}
</div>
<a class="btn btn-default btn-sm pull-right" href="{{cartUrl}}">View Cart</a>
@lauraeddy
lauraeddy / Liquid - Get values
Created November 26, 2015 02:24
Liquid - If field is empty
<pre>{{this|json}}</pre>
@lauraeddy
lauraeddy / Youtube thumbnail
Created November 26, 2015 01:46
Youtube thumbnail format
http://img.youtube.com/vi/SYM-RJwSGQ8/2.jpg
@lauraeddy
lauraeddy / Dropdown - auto select subcategories based on category select.html
Created November 26, 2015 01:46
Dropdown - auto select subcategories based on category select
<div class="col-lg-6 col-md-6 col-sm-6 col-xs-12">
<div class="form-group">
<label for="CAT_Custom_366914">1. Select state<span class="req">*</span>
</label>
<select name="CAT_Custom_366914" id="CAT_Custom_366914" class="form-control select-state">
<option value=" ">-- Please select --</option>
<option class="nsw" value="nsw">NSW</option>
<option class="qld" value="qld">QLD</option>
<option class="sa" value="sa">SA</option>
<option class="vic" value="vic">VIC</option>
@lauraeddy
lauraeddy / Turn off 'draggable' parameter on mobile.js
Created November 26, 2015 01:45
Turn off 'draggable' parameter on mobile
var isDraggable = $(document).width() > 480 ? true : false;
var mapCenter = new google.maps.LatLng({tag_latitude},{tag_longitude});
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
scrollwheel: false,
draggable: isDraggable,
center: {lat: {tag_latitude}, lng: {tag_longitude}} // Lat Lng.
});
@lauraeddy
lauraeddy / Liquid - Address.liquid
Created November 26, 2015 01:44
Liquid - Address
{{address1 | append: ","}} {% if {{address2}} == empty %}{% else %}{{address2 | append: ","}}{% endif %} {{city | append: ","}} {{state | append: ","}} {{zipcode}}