£
GBP
drawer
Prezzi Box
#000000
Build a Prezzi Box in a few simple steps and personalise it with your gift message. We’ve hand-selected the best products in one place to choose from . Select from the items below and fill up your box!
#000000
on
on
40
14
off
off
on
off
off
off
#fdf7fd
#000000
#ff80a6
#ffffff
setTimeout(function(){
if($('#qeapps-preloader').length > 0){
$('#page-transition-overlay').remove();
}
}, 2000);
$(document).on('click','.drawer_close_button, .drawer_filter_button, .drawer_filter_clear_button',function(){
$('#page-transition-overlay').removeClass('active');
});
$(document).on("click", '.addtocart_btn, .accordion_img_remove, .preview_img_remove, .quantity_box_btn[data_step_type="plus"], .quantity_box_btn[data_step_type="minus"]', function () {
var data_prd_id = ($(this).attr('data_prd_id')) ? $(this).attr('data_prd_id') : $(this).attr('data-product-id');
var prdclasses = $('.product_box[data-product-id="'+data_prd_id+'"]').attr('class');
var searchString = "qeboxlimit";
var regex = new RegExp(`\\b\\w*${searchString}\\w*\\b`, "i");
var matchedString = prdclasses.match(regex);
var choose_box_limit = '';
if(matchedString){
choose_box_limit = matchedString[0].split('qeboxlimit').pop();
var hidden_step_settings = $('.hidden_step_settings[data_step_index="2"]').html();
hidden_step_settings = JSON.parse(hidden_step_settings);
hidden_step_settings['builder_step_maximum'] = Number(choose_box_limit);
hidden_step_settings['builder_step_minimum'] = Number(choose_box_limit);
hidden_step_settings = JSON.stringify(hidden_step_settings);
$('.hidden_step_settings[data_step_index="2"]').html(hidden_step_settings);
}
calculateprice();
});
$(document).on('click','.summary_backnext_btn[data-step-type="next"]', function(){
$('.custom_checkout_btn_center').remove();
var custom_checkout_btn_center = document.createElement("div");
custom_checkout_btn_center.className = "custom_checkout_btn_center";
$('.checkout_btn_center').after(custom_checkout_btn_center);
var custom_add_to_cart_btn = document.createElement("button");
custom_add_to_cart_btn.className = "custom_add_to_cart_btn";
custom_add_to_cart_btn.innerHTML = 'Checkout';
$('.custom_checkout_btn_center').html(custom_add_to_cart_btn);
calculateprice();
});
$(document).on('click','.summary_backnext_btn[data-step-type="prev"]', function(){
calculateprice();
});
$(document).on('click','.custom_add_to_cart_btn',function(){
var stepsValidationFlag = [];
var checkproductexist = false;
$.each($(".panel_bg .hidden_step_settings"), function() {
var current_active_index = $(this).attr('data_step_index');
var current_step_object = storage_object['step_'+current_active_index];
var step_selected_products = ( current_step_object && current_step_object.products ) ? current_step_object.products : [];
var step_selected_products_length = step_selected_products.reduce(function (s, a) { return s + a.product_quantity; }, 0);
var step_settings = JSON.parse($('.hidden_step_settings[data_step_index="'+current_active_index+'"]').text());
var builder_step_validation = step_settings.builder_step_validation;
var builder_step_minimum = step_settings.builder_step_minimum;
var builder_step_maximum = step_settings.builder_step_maximum;
var builder_step_type = step_settings.builder_step_type;
var builder_form_setting = step_settings.form_setting;
if(step_selected_products.length > 0){
checkproductexist = true;
}
if(builder_step_validation=='yes'){
if(builder_step_type != 'curated' && Number(step_selected_products_length) < Number(builder_step_minimum)){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "Step - " + current_active_index + " is required. Please select at least "+builder_step_minimum+" product!");
return false;
}
if(builder_step_type != 'curated' && Number(step_selected_products_length) > Number(builder_step_maximum)){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "You can only choose " + builder_step_maximum + " Products!");
return false;
}
if(builder_step_type == 'curated' && Number(step_selected_products_length) == 0){
stepsValidationFlag.push(current_active_index);
triggerGridActive( current_active_index );
sweetAlertPopup('error', "Step - " + current_active_index + " is required. Please Add product!");
return false;
}
}
if(builder_form_setting){
var builder_form_setting_array = $.map(builder_form_setting, function(value, index){
return [value];
});
$.each(builder_form_setting_array, function( key, value ) {
var formfield_index = Number(key) + Number(1);
if(value.validation_radio=='yes'){
var targetElement = $('.panel_bg[data_step_index="'+current_active_index+'"] .form-group_inr[data-formfield-index="formfield_'+formfield_index+'"]');
targetElement.find('.required-validation').remove();
var field_value = targetElement.find('.step_form_input').val();
if(field_value==''){
triggerGridActive( current_active_index );
sweetAlertPopup('error', value.field_name + " is required!");
var required_validation = document.createElement("small");
required_validation.className = "required-validation";
required_validation.innerHTML = value.field_name+' is required!';
targetElement.append(required_validation);
stepsValidationFlag.push(current_active_index);
return false;
}
}
});
}
});
if(checkproductexist == false){
triggerGridActive( 1 );
stepsValidationFlag.push(1);
sweetAlertPopup('error', "Please Add At least 1 product to checkout");
return false;
}
if($('.deliverydate_right_bg.hide').length==0){
var deliverydate_datepicker = $('.deliverydate-datepicker').val();
if(deliverydate_datepicker==''){
sweetAlertPopup('error', "Please select delivery date!");
return false;
}else{
storage_object['delivery_date'] = deliverydate_datepicker;
}
}
if(stepsValidationFlag.length==0){
var requestBody = [];
var properties_array = [];
var cart_properties = {};
var returnedTarget = '';
var embeds_redirection_loader_image = $('.redirection_loader_image').text();
var imageUrl = (embeds_redirection_loader_image !== '') ? embeds_redirection_loader_image : 'https://www.qetail.com/apps/gbb2_0/install/images/gbb2-0-loader_new.gif';
$('.checkout_btn_center .checkout_btn').prop('disabled', true).html('Processing..');
$('.builder-checkout-loader-main').remove();
var loader_div = document.createElement("div");
loader_div.className = "builder-checkout-loader-main";
$('body').append(loader_div);
var loader_sub_div = document.createElement("div");
loader_sub_div.className = "builder-checkout-loader-sub";
$('.builder-checkout-loader-main').append(loader_sub_div);
var loader_sub_div_img_tag = document.createElement("img");
loader_sub_div_img_tag.className = "builder-checkout-loader-img";
loader_sub_div_img_tag.src = imageUrl;
$('.builder-checkout-loader-sub').append(loader_sub_div_img_tag);
var loader_sub_div_div = document.createElement("div");
loader_sub_div_div.className = "builder-checkout-loader-text";
$('.builder-checkout-loader-sub').append(loader_sub_div_div);
var loader_sub_div_text_h2 = document.createElement("h2");
loader_sub_div_text_h2.innerHTML = "We are building your box.";
$('.builder-checkout-loader-text').append(loader_sub_div_text_h2);
var loader_sub_div_text_p = document.createElement("p");
loader_sub_div_text_p.innerHTML = "This may take a few seconds...";
$('.builder-checkout-loader-text').append(loader_sub_div_text_p);
var step1_product_var_id = '';
var step1_product_qty = '';
var step3array = [];
$.each(storage_object, function(objIndex, objValue) {
var step3_products_array = {};
var step4_products_array = {};
var searchText = "step_";
if(objIndex.indexOf(searchText) != -1){
var curatedPrice = (objValue.curated_price) ? objValue.curated_price : '';
var objProducts = (objValue.products) ? objValue.products : [];
var objFormFields = (objValue.form_fields) ? objValue.form_fields : [];
if(objProducts.length > 0){
if(objIndex == 'step_1'){
$(objProducts).each(function(objProductIndex, objProductValue) {
console.log(objProductValue);
if(curatedPrice==''){
step1_product_var_id = objProductValue.product_variant_id;
step1_product_qty = objProductValue.product_quantity;
}
});
}
else if(objIndex == 'step_3'){
$(objProducts).each(function(objProductIndex, objProductValue) {
console.log(objProductValue);
if(curatedPrice==''){
step3_products_array = {
id: objProductValue.product_variant_id,
quantity: objProductValue.product_quantity
};
step3array.push(step3_products_array);
}
});
}
else if(objIndex == 'step_4'){
$(objProducts).each(function(objProductIndex, objProductValue) {
console.log(objProductValue);
if(curatedPrice==''){
step4_products_array = {
id: objProductValue.product_variant_id,
quantity: objProductValue.product_quantity
};
step3array.push(step4_products_array);
}
});
}
else{
$(objProducts).each(function(objProductIndex, objProductValue) {
if(curatedPrice==''){
var prd_name = objProductValue.product_title;
var prd_qty = objProductValue.product_quantity;
var prd_option = objProductValue.product_variant_title;
if(prd_option == "Default Title"){
properties_array[prd_name] = "x"+prd_qty;
}
else{
properties_array[prd_name+" - "+prd_option] = "x"+prd_qty;
}
}
});
}
}
if(objFormFields.length > 0){
$(objFormFields).each(function(objFormFieldsIndex, objFormFieldsValue) {
if(objFormFieldsValue.value){
properties_array[objFormFieldsValue.title] = objFormFieldsValue.value;
}
});
}
returnedTarget = Object.assign(cart_properties , properties_array );
}
});
var productData = {
id: step1_product_var_id,
quantity: step1_product_qty,
properties: returnedTarget
};
step3array.push(productData);
requestBody.push(step3array);
let formData = {
'items': step3array
};
fetch('/cart/add.js', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(formData)
})
.then(response => {
console.log(response);
var c1 = setInterval(function () {
var cartContents = fetch('/cart.js')
.then(response => response.json())
.then(data => {
const c_items = [];
for (i = 0; i < data.items.length; i++) {
var final_price = Number(data.items[i].final_price);
c_items.push(final_price);
var redirect_flag = 'no';
$(c_items).each(function( index,cvalue ) {
if(cvalue <= 0)
{
redirect_flag = 'yes';
}
});
if(redirect_flag == 'no')
{
clearInterval(c1);
location.href="/cart";
}
}
});
}, 500);
})
.catch((error) => {
console.error('Error:', error);
});
}
});
function calculateprice(){
var prd_price = 0;
$('.order_details_right_bg').addClass('calculating_price');
$('.ordersummary_overview').addClass('hideordersummary');
setTimeout(function(){
$.each($(".panel_bg .hidden_step_settings"), function() {
var current_active_index = $(this).attr('data_step_index');
var current_step_object = storage_object['step_'+current_active_index];
var step_selected_products = ( current_step_object && current_step_object.products ) ? current_step_object.products : [];
if(step_selected_products.length > 0){
$.each(step_selected_products, function(key,value) {
prd_price += (value.product_price * value.product_quantity);
});
}
});
var currencySymbol = $('.currency_symbol').text();
var currencyIsoCode = ' '+$('.currency_iso_code').text();
$('.checkout_btn_center').addClass('hide');
$('.order_details_sub_total .right_bld_text').html(currencySymbol+Number(prd_price).toFixed(2)+currencyIsoCode);
$('.order_details_final_total .right_bld_text').html(currencySymbol+Number(prd_price).toFixed(2)+currencyIsoCode);
$('.order_details_right_bg').removeClass('calculating_price');
$('.ordersummary_overview').removeClass('hideordersummary');
}, 1500);
}
.banner_bg_top:after{ background: #ffffff;}
.loadmore_product_btn[data_step_index="1"]{display:none;}
.drawer_filter[data_step_index="1"]{display:none;}
.qeapps-filter-drawer #page-transition-overlay{ background: rgba(0, 0, 0, 0.5);}
.order_steps_listing ul{padding: 0;}
.step_1 .product_select{justify-content: center; display: flex; flex-wrap: wrap;}
.step_1 .product_select .product_box{width:25%;}
.swal2-container.swal2-backdrop-show, .swal2-container.swal2-noanimation {z-index: 99999999;}
.custom_add_to_cart_btn {background: #ff80a6;color: #fff;border: none;outline: none;box-shadow: inherit;cursor: pointer;font-size: 14px;font-weight: 600;display: inline-block;padding: 9px 21px;border-radius: 4px;}
.custom_checkout_btn_center{text-align: center;padding: 20px 0 9px 0px;}
@media only screen and (max-width:991px) {
.step_1 .product_select .product_box {width: 33%;}
}
@media only screen and (max-width:767px) {
.step_1 .product_select .product_box {width: 47%;}
}
@media only screen and (max-width:600px) {
.product_select .product_box .popup_link img{min-height:280px;}
}
@media only screen and (max-width:480px) {
.step_1 .product_select .product_box {width: 47%;}
.product_select .product_box .popup_link img{min-height:120px;}
}
cart