This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Staging and reverse proxy settings */ | |
$public_url = 'https://public-server.com'; | |
$production_server = 'production.example.com'; | |
$staging_server = 'stage.example.com'; | |
/* Staging and reverse proxy code */ | |
if($_SERVER['REQUEST_URI'] == "/?cookiesetter"){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// check for clear-cart get param to clear the cart, append ?clear-cart to any site url to trigger this | |
add_action( 'init', 'woocommerce_clear_cart_url' ); | |
function woocommerce_clear_cart_url() { | |
if ( isset( $_GET['clear-cart'] ) ) { | |
global $woocommerce; | |
$woocommerce->cart->empty_cart(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TagSelector | |
def initialize(tag) | |
@tag = tag | |
end | |
# Returns whether a line item matches this selector or not. | |
# | |
# Arguments | |
# --------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h3>Join our Mailing List</h3> | |
<script type="text/javascript" src="//www1.moon-ray.com/v2.4/include/formEditor/genbootstrap.php?method=script&uid=p2c12727f10&version=1"></script> | |
<span class="moon-ray-form-placeholder-3456"> | |
<link rel="stylesheet" href="//www1.moon-ray.com/formeditor/formeditor/css/form.default.css" type="text/css"><link rel="stylesheet" href="//www1.moon-ray.com/formeditor/formeditor/css/form.publish.css" type="text/css"> | |
<link rel="stylesheet" href="//forms.moon-ray.com/v2.4/include/minify/?g=moonrayCSS" type="text/css"><link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/smoothness/jquery-ui.min.css" type="text/css"> | |
<link rel="stylesheet" href="//www1.moon-ray.com/v2.4/include/formEditor/gencss.php?uid=p2c12727f10" type="text/css"> | |
<div class="moonray-form-p2c12727f10"> | |
<div class="moonray-form moonray-form-label-pos-stacked"> | |
<form class="moonray-form-clearfix" action="https://forms.moon-ray.com/v2.4/form_processo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof Shopify === 'undefined') var Shopify = {}; | |
Shopify.cart = {{ cart | json }}; | |
Shopify.toAdd = 378589397; | |
var surchargeInCart = false; | |
var total = 2507; // total in cents. | |
for (var i=0; i<Shopify.cart.items.length; i++) { | |
if (Shopify.cart.items[i].id === Shopify.toAdd) { | |
surchargeInCart = true; | |
total -= Shopify.cart.items[i].line_price; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Product Price: {{ product.price | money }} | |
Compare Retail Price: {{ product.compare_at_price_max | money }} | |
You save: {{ product.compare_at_price_max | minus:product.price | difference:product.compare_at_price_max | money }} | |
You save: {{ product.compare_at_price_max | minus:product.price | times:100 | divided_by:product.compare_at_price_max }}% |