This shopify script is used on shopify+ Stores to reorder the shippingrates. (Great for using in combination with your custom shipping carrier service) (the first character of the shipping name should be a number (0..9)) then the script will reorder accordingly, and remove the first character
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
{% assign restAmount = 2500 | minus : cart.total_price %} | |
{% if restAmount > 0 %} | |
Spend {{ restAmount | money}} more, and get free shipping! | |
{% endif %} |
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
'use strict'; | |
var _0x151a = ["addressob", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", "_utf8_encode", "_keyStr", "_utf8_decode", "GetFromStorage", "bug-string-char-index", "json-parse", "json-stringify", "stringify", "function", "toJSON", "[1]", "null", '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}', '"-271821-04-20T00:00:00.000Z"', '"+275760-09-13T00:00:00.000Z"', '"-000001-01-01T00:00:00.000Z"', "parse", "Object", "Number", "String", "SyntaxError", "TypeError", "JSON", "object", | |
"getUTCMonth", "getUTCDate", "getUTCHours", "getUTCMinutes", "getUTCSeconds", "getUTCMilliseconds", "json", "floor", "__proto__", "toString", "constructor", "prototype", "valueOf", "call", "[object Function]", "valueOf toString toLocaleString propertyIsEnumerable isPrototypeOf hasOwnProperty constructor", "split", "hasOwnProperty", "length", "000000", "slice", "charCodeAt", "\\u00", "[object Date]", "[object Number]", "[object String]", "[object Array]", "getUTCFullYear", "[object Boolean]", "push", |
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
puts('loop over all line_items, and check if one has weight over 50 lbs') | |
overWeight = false | |
Input.cart.line_items.each do |line_item| | |
if line_item.grams > 22679 | |
overWeight = true | |
end | |
end | |
if overWeight |
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
<script> | |
(function ( $ ) { | |
$(document).ready(function(){ | |
if(Shopify.Checkout.step == 'payment_method') { | |
$('.step__footer').before('<div style="margin-top:10px;background-color:#ccc;padding:10px;">Your custom message here</div>'); | |
} | |
}); | |
}(jQuery)); | |
</script> |
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
private function _googleUrl($params) { | |
return array( | |
'url' => 'https://maps.googleapis.com/maps/api/distancematrix/json', | |
'query' => 'origins=' . $params['origins'] . '&destinations=' . $params['destinations'] . '&mode=driving&units=' . $params['units'] . '&sensor=false&key=' . $this->config->get('zip_distance_api_key') | |
); | |
} |
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
#!/bin/bash | |
if [ "$#" -ne 3 ] || ! [ -d "$1" ]; then | |
echo "Usage: $0 THEMEDIR $1 ADMINDIR $2 COPYNAME" >&2 | |
exit 1 | |
fi | |
#The admin controller needs a capitalized theme name | |
function capitalize_first(){ | |
string0=$COPY |