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> | |
var payment_method_id = '289171'; | |
var shipping_method_id = '258168'; | |
function cashOnDelivery(){ | |
if($("#payments_options input:checked").val() == payment_method_id){ | |
$.each($('#shipping_options input'), function(index, element){ | |
element = $(element) | |
if(element.val() != shipping_method_id){ | |
element.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
var d = new Date() | |
var nDate = d.getTime() + 24 * 60 * 60 * 1000 ; | |
var start_date = new Date(nDate).toJSON().slice(0,10); | |
var min_hour = new Date(nDate).toJSON().slice(11,13); | |
// Cuando selecciona la fecha evalua si es menos de 24 horas hasta las 00:00, si esto ocurre deshabilita las horas que no corresponden | |
$("#checkout").change(function(){ | |
var parts = $("#order_other_fecha_del_despacho").val().split('-'); | |
var mydate = new Date(parseInt(parts[0]), parseInt(parts[1] - 1), parseInt(parts[2])); |
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
Step 1 - Create the Custom Checkout Field Called "Email Confirmation" (Or Similar in your store Language) | |
Step 2 - Paste this script on your Checkout Block | |
<script> | |
var email_confirmation_name = "Email Confirmation" // Replace Email Confirmation with the name of your field | |
var email_confirmation_id = email_confirmation_name.toLowerCase().replace(" ","_") | |
$("#checkout").submit(function(evt){ | |
if($("#order_customer_email").val() != $("#order_contact_"+email_confirmation_name).val(){ | |
evt.preventDefault(); |
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
<!-- Estimate shipping values on the checkout page --> | |
<script> | |
function cleanEstimates(){ | |
// remove all prices and errors | |
$('#shipping_options li').each(function(){ $(this).children().last().detach(); }); | |
// add empty messages - placeholders | |
$('#shipping_options li').each(function(){ $(this).append('<span></span>') }); | |
} |
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> | |
$(document).ready(function(){ | |
$("label[for='order_other_acepto_terminos_y_condiciones']").html('Acepto <a href="/terminos-y-condiciones">Términos y condiciones</a>') | |
}); | |
</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
function hidePayments(){ | |
chile = $("#order_shipping_address_country").val() == "CL"; | |
if(!chile){ | |
$.each($('#payments_options input'), function(index, element){ | |
element = $(element) | |
if(element.val() != '74858'){ | |
element.parent().hide() | |
}else{ | |
element.parent().show() | |
$("#payments_options input[value='74858']").click(); |
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> | |
var stores = { | |
CasaMatriz: { | |
id: "113269", | |
address: "Retiro en Tienda: Dr. Manuel Barros Borgoño 160, OF 201, Providencia - Retiro a Partir de 1 Dia Habil.", | |
city: "Santiago", | |
municipality: 8261414, | |
region: "12" | |
}, | |
LosLeones: { |
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
/*! | |
* Simple Age Verification (https://github.com/Herudea/age-verification)) | |
requires <script src="//cdn.jsdelivr.net/jquery.cookie/1.4.1/jquery.cookie.min.js"></script> | |
*/ | |
var modal_content, | |
modal_screen; | |
// Start Working ASAP. |
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
/*! | |
* Age verification CSS to go with the JS that can be found at (https://github.com/Herudea/age-verification) | |
*/ | |
#modal_screen { | |
position: fixed; | |
top:0; | |
left: 0; | |
height: 100%; | |
width: 100%; |
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
<!-- Instagram widget --> | |
<div class="col-12"><h2>{% t 'Instagram' %}</h2></div> | |
<div id="instagram" class="col-12"></div> | |
<!-- Instagram script --> | |
<script> | |
$.ajax({ | |
url: "https://js-instagram-proxy.herokuapp.com/{{social.instagram_url | replace: "https://www.instagram.com/", "" }}/media", | |
dataType: "jsonp", | |
data: { |