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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$("#order_shipping_address_taxid").attr("pattern", "[0-9]{7,8}-[0-9Kk]{1}"); // with . and . [0-9]{1,2}.[0-9]{3}.[0-9]{3}-[0-9Kk]{1} | |
$("#order_shipping_address_taxid").attr("placeholder", "ej. 12345678-5"); | |
$("#order_shipping_address_taxid").attr("title", "ej. 12345678-5"); | |
var Fn = { | |
// Valida el rut con su cadena completa "XXXXXXXX-X" | |
validaRut : function (rutCompleto) { | |
if (!/^[0-9]+[-|‐]{1}[0-9kK]{1}$/.test( rutCompleto )) |
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
{% for variant in product.variants %} | |
{% for value in variant.values %} | |
{% if value.name == "Por Mayor" %} | |
{% assign precio_por_mayor = variant.price %} | |
{%endif%} | |
{%endfor%} | |
{%endfor%} | |
{{precio_por_mayor | 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
var shipping_to = ["Ñuñoa","Providencia","Vitacura","Santiago Centro","Las Condes"]; //hides all states not included in this array | |
var interval = setInterval(function(){ | |
if($('#order_shipping_address_municipality').text()){ | |
$('#order_shipping_address_municipality option:not(:first)').filter(function() { | |
return $.inArray($.trim($(this).text()), shipping_to) == -1; | |
}).remove(); | |
clearInterval(interval) | |
} |
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
<script type="text/javascript"> | |
$(document).ready(function(){ | |
$('form#checkout').submit(function(){ | |
// change address to "retiro en tienda" | |
if($('#order_shipping_method_96203').is(':checked')){ | |
$('#order_shipping_address_address').val('Av. Apoquindo 4900 local 160, Centro Comercial OMNIUM'); | |
$('#order_shipping_address_city').val('Santiago'); | |
$('#order_shipping_address_postal').val('7560973'); | |
$('#order_shipping_address_region').val('12') |
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
<script type="text/javascript"> | |
var shipping_to = ["12","03"]; //hides all regiones not included in this array | |
setTimeout(function(){ | |
$('#estimate_shipping_region option').filter(function() { | |
return $.inArray($.trim($(this).val()), shipping_to) == -1; | |
}).remove(); | |
}, 1000); | |
$("#estimate_shipping_region").change(); | |
</script> |
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
<script type="text/javascript"> | |
// In admin panel: Settings > Checkout should be like: https://www.evernote.com/l/AJqFD-JxfUtEoI5LVNy_tRocu30aPTBBVuk | |
// Boleta o Factura Should be like: https://www.evernote.com/l/AJpcG43vJa1GLbQi2OgbRN_T4iUvJcIS4VQ | |
$(document).ready(function(){ | |
setTimeout(function(){ $("#other").prependTo("#shipping_address_same_as_shipping"); $("#order_billing_address_country").val('CL'); $("#order_billing_address_country").change(); }, 1000); // set billing address for chile. | |
var Fn = { |
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
<script> | |
// Municipalities and region codes are here: https://docs.google.com/spreadsheets/d/1X4A4gBMHehHSFWVDF1e17XPOc6dY4f6byqkl7MM7ENo/edit?usp=sharing | |
$("#order_shipping_address_region").change(function(){ | |
if( $('#order_shipping_method_100969').is(':checked')){ // cambiar el numero 100969 por el codigo del medio de envio de retiro en tienda se obtiene acá http://prntscr.com/lf7v08 | |
var interval = setInterval(function(){ | |
$('#order_shipping_address_municipality').val(8261417); // cambiar código de comuna por el que corresponda | |
if($('#order_shipping_address_municipality').val()){ | |
$('#order_shipping_address_municipality').parent().hide(); |
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
<script> | |
(function($) { | |
jQuery.fn.Rut = function(options) { | |
var defaults = { | |
digito_verificador: null, | |
on_error: function() {}, | |
on_success: function() {}, | |
validation: true, | |
format: true, | |
format_on: 'change' |
OlderNewer