Skip to content

Instantly share code, notes, and snippets.

@hidixit
hidixit / json_test_call_element.txt
Last active November 4, 2016 09:49
module_json
{% for task in this.SERVICES[0].TASKS -%}
<table>
<tr>
<td> DESCRIPTION: {{task.DESCRIPTION}}</td>
</tr>
<tr>
@hidixit
hidixit / sort_wieght_products
Created November 4, 2016 07:09
module_data with resources as products
<!DOCTYPE HTML>
<html>
<head>
<title>module-data-prices</title>
</head>
<body>
{module_data resource="products" version="v3" fields="id,siteId,name,weight,productCode" skip="0" limit="10" order="id" collection="myData"}
@hidixit
hidixit / sort_prices.txt
Created November 4, 2016 07:07
module_data for resources as prices
<!DOCTYPE HTML>
<html>
<head>
<title>module-data-prices</title>
</head>
<body>
{module_data resource="prices" version="v3" fields="productId,retailPrice,salePrice,quantity2,product" skip="0" limit="10" order="countryCode" collection="myData"}
@hidixit
hidixit / Sort_module_data.txt
Created November 2, 2016 12:58
module_data_Prices
<!DOCTYPE HTML>
<html>
<head>
<title>module-data-prices</title>
</head>
<body>
{module_data resource="prices" version="v3" fields="productId,retailPrice,salePrice,quantity2,product" skip="0" limit="10" order="countryCode" collection="myData"}
@hidixit
hidixit / globals_site.txt
Last active December 13, 2016 13:00
Globals_site_object
<p>Hostname is : {{globals.site.host}}</p>
@hidixit
hidixit / Catalog_Swap.txt
Last active October 18, 2016 11:56
Dynamically change Image in template based on Catalog selected
<!DOCTYPE html>
<html>
<head>
<title>Catalog Image Swap</title>
</head>
<body>
<div class="img-src-swap">
{% if {{globals.get.CatalogueID}} == "409740" %}
@hidixit
hidixit / liquid-pageTitle.txt
Created October 17, 2016 09:38
Condition based on page title - {module_pagetitle}
<script>
{module_pagetitle collection="myData" template=""}
{% if {{myData.title}} == "Home page is best" %}
alert("This is awesome");
{% endif %}
</script>
@hidixit
hidixit / referrer.txt
Last active October 14, 2016 16:40
Get Referrer Url from where form was submitted
<!DOCTYPE HTML>
<html>
<head>
<title>pick-referrerUrl-Liquid</title>
<style>
.pickFields {
display:none;
}
{% if {{globals.get.CatalogueID}} == 332550 -%}
hi
{% include "/Layouts/OnlineShop/large_product_events.html" -%}
{% elseif {{globals.get.CatalogueID}} == 337852 -%}
helo
{% include "/Layouts/OnlineShop/large_product_products.html" -%}
{% endif -%}
@hidixit
hidixit / blog_overall.txt
Created October 7, 2016 05:40
Control Rendering of Categories based on Blog ID's
<div class="blog-container">
<h1>{tag_blogtitle}</h1>
<br />
<p class="description">{tag_blogdescription}</p>
<div class="wrapper clear">
<div class="post-list"> {tag_postlist,2 collection="myPosts"}
<pre>
{% assign myVar = {{myPosts.items[0].url | json}} %}