This file contains 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
$morestring = '<!--more-->'; | |
$explode_content = explode( $morestring, $post->post_content ); | |
$content_before = apply_filters( 'the_content', $explode_content[0] ); | |
$content_after = apply_filters( 'the_content', $explode_content[1] ); |
This file contains 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
// require gulp plugins | |
var gulp = require('gulp'); | |
var imageresize = require('gulp-image-resize'); | |
var imagemin = require('gulp-imagemin'); | |
var watermark = require("gulp-watermark"); | |
var rename = require("gulp-rename"); | |
var gulpif = require('gulp-if'); | |
var paths = { |
This file contains 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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
This file contains 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
<!--In theme.liquid, change:--> | |
<meta content="0; url=/account/login?checkout_url={{ return_url }}" http-equiv="refresh" /> | |
<!--to --> | |
<meta content="0; url=/account/login?return_url={{ return_url }}" http-equiv="refresh" /> | |
<!-- In customers/login.liquid, give the submit button an ID of customerlogin, for example: --> |
This file contains 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
<iframe src="https://t.pepperjamnetwork.com/track?PROGRAM_ID=####&INT=DYNAMIC{% assign sub_total = 0 %}{% for line_item in line_items %} {% assign sub_total = line_item.line_price | plus: sub_total %}{% endfor %}{% assign sub_total = sub_total | append: '.00' %}{% assign discount = 0 &}{% assign discount_percentage = 1 %}{% if order.discounts_amount > 0 %}{% for eachdiscount in order.discounts %}{% if eachdiscount.type != "ShippingDiscount" %}{% assign discount = discount | plus: eachdiscount.total_amount %}{% endif %}{% endfor %}{% endif %}{% assign disBYsub = discount | divided_by: sub_total %}{% assign discount_percentage = 1 | minus: disBYsub %}{% for line_item in line_items %}{% assign sub_total = line_item.line_price | plus: sub_total %}{% endfor %}{% assign sub_total = sub_total | append: '.00' %}{% for line_item in line_items %}&ITEM_ID{{ forloop.index }}={% if variant.available %}{{ line_item.variant.id }}{% else %}{{ line_item.sku }}{% endif %}&ITEM_PRICE{{forloop.index}}={% assign afterDiscountPric |
This file contains 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
<form action="/cart/add" method="post"> | |
{% if product.variants.size > 1 %} | |
{% if product.options[0] %} | |
{% assign used = '' %} | |
<label for="select-one">{{ product.options[0] }}</label> | |
<select id='select-one' onchange="letsDoThis()"> | |
{% for variant in product.variants %} | |
{% unless used contains variant.option1 %} | |
<option value="{{ variant.option1 }}">{{ variant.option1 }}</option> | |
{% capture used %}{{ used }} {{ variant.option1 }}{% endcapture %} |
This file contains 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
{% comment %} | |
To add a companion product to the cart automatically if a primary product is in cart: | |
1. Create a new link list under your Navigation tab. | |
2. In that link list, make the first link point to companion product. | |
3. Copy your link list handle where indicated at line 9 | |
4. Set the minimum cart total required for the bonus product on line 10 | |
{% endcomment %} | |
{% assign linklist = linklists['put-your-link-list-handle-here'] %} | |
{% assign min_total = 100 %} |
This file contains 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
discounted_product = 12275195905 | |
products_needed = [592406273] | |
products_seen = [] | |
Input.cart.line_items.each do |line_item| | |
product = line_item.variant.product | |
products_seen << product.id if products_needed.include?(product.id) | |
end | |
Input.cart.line_items.each do |line_item| |
This file contains 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
# See https://onlygrowth.com/blogs/posts/17-shopify-scripts-to-maximize-conversions for some helpful snippets | |
class FreeGift | |
def initialize(variant_id, minTotal, message, quantity = 1) | |
@variant_id = variant_id | |
@minTotal = minTotal | |
@message = message | |
@giftQuantity = quantity | |
end | |
# Get the total of the cart without the variant price being included |
This file contains 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
import kue from 'kue' | |
import express from 'express' | |
const app = express(); | |
const jobs = kue.createQueue() | |
app.use('/api', kue.app); | |
app.get('/job', (req, res) => { |
OlderNewer