| Current Path : /var/www/magento.test.indacotrentino.com/www/pub/static/frontend/Magento/indaco/it_IT/js/ |
| Current File : /var/www/magento.test.indacotrentino.com/www/pub/static/frontend/Magento/indaco/it_IT/js/theme.js |
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
define([
'jquery',
'mage/smart-keyboard-handler',
'mage/mage',
'domReady!'
], function ($, keyboardHandler) {
'use strict';
$('.cart-summary').mage('sticky', {
container: '#maincontent'
});
$('.header-wrapper-right > .header.links').clone().appendTo('#store\\.links');
$('#store\\.links li a').each(function () {
var id = $(this).attr('id');
if (id !== undefined) {
$(this).attr('id', id + '_mobile');
}
});
keyboardHandler.apply();
$('#contact-form').submit(function(){
if($(this).valid() )
_iub.cons.sendData()
})
$('#form-validate').submit(function(){
if($(this).valid() )
_iub.cons.sendData()
})
$('#co-payment-form').submit(function(){
if($(this).valid() )
_iub.cons.sendData()
})
$('#privacy-form').submit(function(){
_iub.cons.sendData()
})
// $(document).on("click","button[data-role=opc-continue]", function() {
$(document).on("click",".payment-group button.checkout", function() {
_iub.cons_instructions.push(["submit",
{
form: {
selector: document.getElementById("checkoutSteps"),
map: {
subject: {
first_name: "firstname",
last_name: "lastname",
email: "username"
},
exclude: ['password', 'password_confirmation'],
preferences: {
policy: "privacy",
terms: "terms",
adult: "adult",
consent1: "consent1",
consent2: "consent2",
consent3: "consent3"
}
}
},
consent: {
legal_notices: [{
identifier: "term",
version: "1"
}]
}
},
{
success: function(response) {
// console.log(response);
},
error: function(response) {
// console.log(response);
}
}
])
/*
_iub.cons_instructions.push(["load", {
form: {
selector: document.getElementById("checkoutSteps"),
map: {
subject: {
first_name: "firstname",
last_name: "lastname",
email: "username"
},
exclude: ['password', 'password_confirmation'],
preferences: {
policy: "privacy",
terms: "terms",
adult: "adult",
consent1: "consent1",
consent2: "consent2",
consent3: "consent3"
}
}
},
consent: {
legal_notices: [{
identifier: "privacy_policy",
},
{
identifier: 'cookie_policy',
},
{
identifier: "terms",
}
],
}
}]);
_iub.cons.sendData()
*/
});
});