Skip to content

Instantly share code, notes, and snippets.

View omeome762's full-sized avatar

Ash Ome omeome762

View GitHub Profile
@omeome762
omeome762 / Notification_PopUp_settings.json
Created April 2, 2017 08:48
Notification_PopUp_settings
{
"name": "Notification Pop up",
"settings": [
{
"type": "header",
"content": "Notification pop up setting"
},
{
"type": "checkbox",
"id": "popup_enable",
@omeome762
omeome762 / notify_popup.scss.liquid
Created April 2, 2017 08:30
Style Sheet Snippet for Notification Pop Up
@import url(//fonts.googleapis.com/css?family=Raleway:300,700);
#someone-purchased{background:#fff;border:0;display:none;
border-radius:0;bottom:20px;left:20px;top:auto !important;right:auto !important;padding:0;position:fixed;text-align:left;width:auto;z-index:99999;font-family:Raleway,sans-serif;-webkit-box-shadow:0 0 4px 0 rgba(0,0,0,.4);-moz-box-shadow:0 0 4px 0 rgba(0,0,0,.4);box-shadow:0 0 4px 0 rgba(0,0,0,.4);}
#someone-purchased div img{cursor:pointer;float:left;max-height:85px;
max-width:120px;width:auto}#someone-purchased div p{color:{{ settings.popup_message }};float:left;font-size:13px;margin:0 0 0 13px;width:auto;padding:10px 10px 0 0;line-height:20px}
#someone-purchased div p a{padding-right: 51px; color:{{ settings.popup_product_title_olor }} !important; display:block;font-size:15px;font-weight:700}
#someone-purchased div p a:hover{color:#000}#someone-purchased div p small{text-align: right; display:block;font-size:10px;margin-bottom:8px;}
@omeome762
omeome762 / Popupnotfication.js
Last active July 10, 2017 02:45
POP UP Notification like Notify apps
<script>
$(function() {
$('#someone-purchased').show();
var mytimeAgo = ['20 seconds', '34 seconds','35 seconds', '43 seconds','1 minute', '5 minutes', '10 minutes', '12 minutes', '14 minutes', '16 minutes', '18 minutes', '20 minutes', '25 minutes', '30 minutes', '35 minutes', '40 minutes','42 minutes','45 minutes', '50 minutes', '1 hours'];
var randomlytimeAgo = Math.floor(Math.random() * mytimeAgo.length);
var currentmytimeAgo = mytimeAgo[randomlytimeAgo];
@omeome762
omeome762 / Display Shipping Carrier Name Below Shipping Method.rb
Created March 3, 2017 16:06
Display Shipping Carrier Name Below Shipping Method by Digital Develop for Shopify Plus Merchants
Input.shipping_rates.each do |shipping_rate|
shipping_rate.apply_discount(shipping_rate.price, { message: shipping_rate.source })
end
Output.shipping_rates = Input.shipping_rates
@omeome762
omeome762 / Standard Free Shipping.rb
Last active April 2, 2017 13:39
Free Shipping script by Digital Develop for Shopify Plus
MESSAGE = "Free Standard Shipping" #promotional message
Input.shipping_rates.each do |shipping_rate|
next unless shipping_rate.source == "shopify"
next unless shipping_rate.name == "Free Standard Shipping"
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE)
end
Output.shipping_rates = Input.shipping_rates
@omeome762
omeome762 / Free Shipping If Cart Value >$Y (Excluding States You Don't want).rb
Last active February 11, 2020 18:16
Free Shipping If Cart Value >$Y (Excluding States You Don't want)
MINIMUM_ORDER_AMOUNT = 75 #dollars required in cart to get discount
MESSAGE = "Spend Just 75$ & Get Freeshipping" #promotional message
if !Input.cart.shipping_address.province.include?("Newyork") && !Input.cart.shipping_address.province.include?("Newyork")
if Input.cart.subtotal_price_was > (Money.new(cents:100) * MINIMUM_ORDER_AMOUNT)
Input.shipping_rates.each do |shipping_rate|
if shipping_rate.name.include?("3 Day Ground")
shipping_rate.change_name("Free Three Day Ground", { message: "" })
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE)
end
@omeome762
omeome762 / Free Shipping If Cart Value >$X.rb
Last active February 11, 2020 18:16
Free Shipping If Cart Value >$X
MINIMUM_ORDER_AMOUNT = 75 #dollars required in cart to get discount
MESSAGE = "Free shipping if you order over 75" #promotional message
if Input.cart.subtotal_price_was > (Money.new(cents:100) * MINIMUM_ORDER_AMOUNT)
Input.shipping_rates.each do |shipping_rate|
next unless shipping_rate.source == "shopify"
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE)
end
end
@omeome762
omeome762 / X% Off Shipping If Cart Value =>$Y.rb
Last active April 2, 2017 13:47
X% Off Shipping If Cart Value =>$Y
MINIMUM_ORDER_AMOUNT = 75 #dollar amount required in cart to get discount
DISCOUNT = 0.2 #percentage discount (in decimal format)
MESSAGE = "20% off on shipping if your order is over $75" #promotional message
if Input.cart.subtotal_price_was => (Money.new(cents:100) * MINIMUM_ORDER_AMOUNT)
Input.shipping_rates.each do |shipping_rate|
next unless shipping_rate.source == "shopify"
shipping_rate.apply_discount(shipping_rate.price * DISCOUNT, message: MESSAGE)
end
end
@omeome762
omeome762 / Free shipping for VIP customers with the tag "VIP".rb
Last active July 21, 2020 09:51
Free shipping for VIP tagged customers, Shopify Script for run free shipping
TAG = "vip" #customer tag
MESSAGE = "VIP Customer Reward" #additional message
customer = Input.cart.customer
if customer
if customer.tags.include?(TAG)
Input.shipping_rates.each do |shipping_rate|
if shipping_rate.name.include?("Insured Shipping and Handling (USPS Priority Express)")
shipping_rate.change_name("FREE VIP GROUND SHIPPING (USPS Priority Express)", { message: "" })
shipping_rate.apply_discount(shipping_rate.price, message: MESSAGE)