function PWCartCheckout_wapp(wa_txt) {
cid = (typeof cid !== 'undefined') ? cid : GetAlexCartID();
let stepcode="L'ID del tuo carrello é "+cid+" e contiene:
\n";
stepcode+=wa_txt.replaceAll("\n","
")+"
\n";
stepcode+="Se lo vuoi pre-ordinare, puoi farlo tramite via Whatsapp o e-mail usando i pulsanti qui sotto.
\n";
stepcode+="Ti risponderemo al piú presto per confermare il tutto e stabilire la data del ritiro (normalmente max 2gg lavorativi).
\n";
stepcode+="Se invece le vuoi spedite, nel messaggio aggiungi anche i dati completi di spedizione (nome e indirizzo).
\n";
stepcode+="La spedizione ha normalmente un costo di 8 euro, IVA inclusa
\n";
let watext="Vorrei confermare il pre-ordine del carrello nr. "+cid+" che contiene:\n\n"+wa_txt;
stepcode+="Conferma preordine via Whatsapp
\n";
stepcode+="Conferma preordine via E-mail\n";
optbox = jQuery("
", { id: 'optbox', style: 'width:auto;height:auto;', html: stepcode});
optbox.dialog({
title : "Pre-ordine",
draggable: false,
resizable: false,
closeOnEscape: true,
modal : true,
close: function( event, ui ) {jQuery( this ).dialog( "close" ); jQuery('#optbox').remove();},
width: jQuery(window).width()*0.98,
height: (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight),
position: { my: "center", at: "top", of: window },
create: function( event, ui ) { jQuery(this).parent().css("maxWidth", "980px"); },
buttons: {
"Chiudi": function() {
jQuery( this ).dialog( "close" );
jQuery('#optbox').remove();
}
}
});
}
function PWCartCheckout_cc(cid) {
cid = (typeof cid !== 'undefined') ? cid : GetAlexCartID();
var par="action=PayMail";
par+="&cid="+encodeURIComponent(cid);
var params = {
type: "POST",
url: "https://alexander-venezia.com/alexcart/cart.php",
dataType: 'json',
cache: false,
data: par,
success: function(result){
console.log(result);
}
};
jQuery.ajax(params);
}
function PWCartCheckout(cid) {
cid = (typeof cid !== 'undefined') ? cid : GetAlexCartID();
var par="action=checkout";
par+="&cid="+encodeURIComponent(cid);
var params = {
type: "POST",
url: "https://alexander-venezia.com/alexcart/cart.php",
dataType: 'json',
cache: false,
data: par,
success: function(result){
PWCartCheckout_wapp(result.html_checkout)
}
};
jQuery.ajax(params);
}
function PWShowPriceFromAlexCart(code) {
let par="action=AlexCartShowPrice";
par+="&code="+encodeURIComponent(code);
par+="&cid="+encodeURIComponent(GetAlexCartID());
let params = {
type: "POST",
url: "https://alexander-venezia.com/alexcart/cart.php",
data: par,
dataType: 'json',
success: function(result){
optbox = jQuery("", { id: 'optbox', style: 'width:auto;height:auto;', html: result.html});
optbox.dialog({
title : "Quantity Discounts",
draggable: false,
resizable: false,
closeOnEscape: true,
modal : true,
close: function( event, ui ) {jQuery( this ).dialog( "close" ); jQuery('#optbox').remove();},
width: 'auto',
height: 'auto',
position: { my: "center", at: "top", of: window },
create: function( event, ui ) { jQuery(this).parent().css("maxWidth", "980px"); },
buttons: {
"Chiudi": function() {
jQuery( this ).dialog( "close" );
jQuery('#optbox').remove();
}
}
});
}
};
jQuery.ajax(params);
}
function PWShowOptionDesc(pg) {
let html="