Skip to content

Instantly share code, notes, and snippets.

View projoomexperts's full-sized avatar

projoomexperts

View GitHub Profile
if( function_exists('register_field_group') ):
register_field_group(array (
'key' => 'group_5510816f2274e',
'title' => 'Portfolio Options',
'fields' => array (
array (
'key' => 'field_5510818e3a75c',
'label' => 'Sub Title',
@projoomexperts
projoomexperts / price-match.liquid
Created June 6, 2015 14:22
Shopify Price Match App
<a href="#" class="btn" id="price_match">Price Match</a>
<div class="pop_wrap" style="display:none;">
<div class="pop_hold">
<div class="pop_hip">
<div class="pop_inner">
<div class="close-this"></div>
<div class="form-wrap">
function img_process( $src , $size ) {
$pathinfo = pathinfo($src);
$pathname = $pathinfo['dirname'];
$filename = $pathinfo['basename'];
if($src){
if($size == 'xs'){
echo $pathname.'/4_'.$filename;
} elseif ($size == 'sm') {
echo $pathname.'/3_'.$filename;
} elseif ($size == 'md') {
<script>
jQuery(document).ready(function(){
jQuery('.top-cta').fancybox();
})
</script>
<script>
jQuery(document).ready(function(){
jQuery('.bottom-cta').fancybox();
})
</script>
@projoomexperts
projoomexperts / sizevariant
Created May 11, 2016 18:50
Shopify size variant label in collection page under product.
<ul class="sizelist">
{% for option in product.options %}
{% if option == 'Size' %}
{% assign index = forloop.index0 %}
{% assign colorlist = '' %}
{% assign color = '' %}
{% for variant in product.variants %}
{% capture color %}
{{ variant.options[index] }}
{% endcapture %}
ul.sizelist li {
display: inline-block;
border: 1px solid #ddd;
padding: 1px 4px;
}
ul.sizelist {
display: block;
text-align: center;
}
@projoomexperts
projoomexperts / gist:2ea9bde8c418bb85a1afa13d6120560f
Created May 13, 2016 04:21
Shopify Webhook to read customer registration
<?php
$webhookContent = "";
$webhook = fopen('php://input' , 'rb');
while (!feof($webhook)) {
$webhookContent .= fread($webhook, 4096);
}
fclose($webhook);
<!-- /snippets/product-grid-item.liquid -->
{% comment %}
This snippet is used to showcase each product during the loop,
'for product in collection.products' in collection.liquid.
A liquid variable (grid_item_width) is set just before the this
snippet is included to change the size of the container.
Once the variable is set on a page, all future instances of this
snippet will use that width. Overwrite the variable to adjust this.
@projoomexperts
projoomexperts / product-grid-item.liquid
Created May 15, 2016 16:30
Brooklyn theme grid layout multiple product variant
<!-- /snippets/product-grid-item.liquid -->
{% comment %}
This snippet is used to showcase each product during the loop,
'for product in collection.products' in collection.liquid.
A liquid variable (grid_item_width) is set just before the this
snippet is included to change the size of the container.
Once the variable is set on a page, all future instances of this
snippet will use that width. Overwrite the variable to adjust this.