Skip to content

Instantly share code, notes, and snippets.

<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()
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]));
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();
<!-- 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>') });
}
@aatronco
aatronco / Jumpseller_link_on_checkout_field.html
Created November 22, 2018 17:32
Add a link for terms and conditions in Jumpseller checkout
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();
<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: {
/*!
* 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.
/*!
* 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%;
<!-- 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: {