Skip to content

Instantly share code, notes, and snippets.

View carlitoescobar's full-sized avatar
👁️
Looking

Carlito carlitoescobar

👁️
Looking
View GitHub Profile
@carlitoescobar
carlitoescobar / functions.php
Created October 10, 2018 17:47 — forked from AMNDesign/functions.php
Dynamically populate Gravity Forms fields with WordPress user info for logged in users using get_currentuserinfo().
<?php
//* Using the Gravity Forms editor, be sure to check "Allow field to be populated dynamically under Advanced Options
//* You will need to set the Field Parameter Name value to work with the filter as follows: gform_field_value_$parameter_name
//* Dynamically populate first name for logged in users
add_filter('gform_field_value_first_name', 'populate_first_name');
function populate_first_name($value){
global $current_user;
get_currentuserinfo();
return $current_user->user_firstname;
@carlitoescobar
carlitoescobar / shopify_stuff.liquid
Last active September 20, 2019 15:50
General Shopify Conditionals etc.
///////////////////////////////////////////////////
// Checking for template conditional
///////////////////////////////////////////////////
<div class="content-wrapper">
{% if template == 'index' %}
{{ content_for_layout }}
{% elsif template == 'page.aboutus' %}
{{ content_for_layout }}
{% else %}
@carlitoescobar
carlitoescobar / collection-prod-selectbox.liquid
Created September 22, 2019 17:15
Shopify select box to show list of products in a collection
<select onchange="javascript&colon;location.href = this.value;">
{% for p in collection.products %}
{% unless p.id == product.id %}
<option value="{{ p.url | within: collection }}">{{ p.title }}</option>
{% endunless %}
{% endfor %}
</select>
@carlitoescobar
carlitoescobar / product.mil_coffee_card.liquid
Created October 1, 2019 18:56
Highlighted code from coffee card page.
<form action="/cart/add" method="post" enctype="multipart/form-data" class="product-form" id="AddToCartForm">
<div class="mmc-engine-sf-float-left-wrapper">
<select name="id" id="ProductSelect" class="product-form__variants">
{% for variant in product.variants %}
<option {% if variant == current_variant %} selected="selected" {% endif %} data-sku="{{ variant.sku }}" value="{{ variant.id }}" {% unless variant.available %} disabled="disabled" {% endunless %} data-price="{{ variant.price | money_without_currency | remove: ',' }}">
{% if variant.available %}
{{ variant.title }} - {{ variant.price | money_with_currency }}
{% else %}
{{ variant.title }} - {{ 'products.product.sold_out' | t }}
{% endif %}
@carlitoescobar
carlitoescobar / config.yml
Created October 11, 2019 02:21 — forked from brettchalupa/config.yml
Shopify Theme Kit config example for screencast (https://www.youtube.com/watch?v=1xWFsYmBoX0)
development:
store: example.myshopify.com
password: add-password-in-config
theme_id: "live"
bucket_size: 40
refill_rate: 2
ignore_files:
- "*.swp"
- "*~"
- "config/settings_data.json"
@carlitoescobar
carlitoescobar / index.html
Created January 13, 2020 15:09
Pricing Tables
<div id="price">
<!--price tab-->
<div class="plan">
<div class="plan-inner">
<div class="entry-title">
<h3>Basic Wash</h3>
<div class="price">$25<span>/PER CAR</span>
</div>
</div>
<div class="entry-content">
@carlitoescobar
carlitoescobar / bootstrap-rounded-pricing-tables.markdown
Created January 13, 2020 15:12
Bootstrap rounded Pricing tables
@carlitoescobar
carlitoescobar / index.pug
Created January 13, 2020 15:16
Pricing Tables
.lm-tabel
.lm-item.lm-item-2
.lm-item-top
span.lm-item-title.lm-underline START
.lm-item-price
i.icon-dollar
|0.995
.lm-item-body
.lm-item-desc
strong CUSTOM AIR
@carlitoescobar
carlitoescobar / index.html
Created January 13, 2020 15:17
Pricing Tables
<div class="demo-wrap">
<div class="demo-header">
<h1>Responsive Pricing</h1>
<p>pricing plan layout using flexbox</p>
</div>
<!-- PRICING PLANS -->
<section class="pricing-plans">
<!-- Pricing Tables -->
@carlitoescobar
carlitoescobar / Quantity Discounts
Last active December 5, 2020 21:38 — forked from bhays/Quantity Discounts
Auto discount prices based on quantities in Gravity Forms. Uses a percentage based approach.
(function($){
$.fn.quantityDiscounts = function(options) {
// set up default options
var defaults = {
discountColor: '#FF0000',
discounts: [
{ limit: 174, discount: .75, text: "25% Discount Applied"},
{ limit: 139, discount: .80, text: "20% Discount Applied"},