PROPOSAL DATE: June 3, 2022 PROPOSAL LOCATION: Fargo Brewing Company PROPOSAL STORY: I told her I wanted to wait after Drake White's concert to meet him. He is one of our favorite singers. When we finally got to meet him, he asked if we wanted anything signed. I said yes and gave him Sarah's hat. He asked what he should write and I told him to write, Sarah, will you marry me. She was very caught off guard and Drake White was excited to be a part of that. She said yes and we've seen him 3 times in concert! THE RING: Grandmother's ring WEDDING DATE: July 29, 2023 WEDDING LOCATION: Detroit Lakes
Choosing a selection results in a full page refresh.
Quick view [split_t4nt][split_t4nt][split_t4nt]Add to cart [split_t4nt]
var cfp_product_collection_Data ={
"products": ['8133465407776'],
"collections": [
"157209067578"
]
};
var cfp_sb_variable = '1';
var ProIDsCollections='';
var cfp_configuration = {
"is_enabled": "1",
"is_all_products": "1",
"callforprice_label": "Call for Price",
"email": "example@gmail.com",
"title": "Call for Price",
"submit": "Submit",
"hidePrice": "#shopify-section-collection-template .price",
"is_redirect": "1",
"redirect_url": "",
"recaptcha_enable": "0",
"form_theme": "1",
"country_enable": "0",
"shw_in_listing": "0",
"mail_chimp_enable": "undefined",
"pay_status": "active",
"plan_name": "cfp plan premium",
"save_customer": "0",
"gdpr_msg": "I agree to my email being stored and used to receive the newsletter.",
"variants_enable": "1",
"name_form_field": "Enter name",
"email_form_field": "Enter E-mail",
"phone_form_field": "Your Phone Number EX : +919999999999",
"country_form_field": "Select Country",
"message_form_field": "Enter Your Message",
"message_form_field_switch": "1",
"country_form_field_switch": "0",
"phone_form_field_switch": "1",
"phone_form_field_switch_required": "1",
"message_form_field_switch_required": "1",
"country_form_field_switch_required": "0",
"no_of_servings_form_field": "Enter No Of Servings",
"date_form_field": "Event Date",
"no_of_servings_form_field_switch": "undefined",
"no_of_servings_form_field_switch_required": "undefined",
"date_form_field_switch": "undefined",
"date_form_field_switch_required": "undefined",
"form_button_display_option": "show_cfp_form",
"callforpriceWhatsapp_label": "Call For Price",
"phone_form_field_whatsapp": " 919999999999",
"cfp_btn_customize_for": "",
"cfp_bg_colorValue": "#000000",
"cfp_text_colorValue": "#ffffff",
"quantity_form_field": "Enter Quantity",
"quantity_form_field_switch_required": "0",
"quantity_form_field_switch": "0",
"translate_fields": {
"placeholder_name": "Enter name",
"placeholder_email": "Enter E-mail",
"placeholder_your_msg": "Enter Your Message",
"placeholder_phone": "Your Phone Number EX : +919999999999",
"select_country": "Select Country",
"hidden_label": "Enter name",
"name_vald": "Please Enter a Name",
"email_blank_vald": "Please Enter An E-mail",
"email_invalid_vald": "Please Enter A Valid E-mail",
"country_vald": "Please Enter A Country",
"phone_blank_vald": "Please Enter Phone",
"phone_cc_vald": "Please Enter Country Code EX : +919999999999",
"no_of_servings_form_field_msg_vald": "Please Enter Only No",
"date_form_field_msg_vald": "only enter date",
"quantity_form_field_msg": "Enter Quantity",
"message_vald": "Please Enter A Message",
"success_message": "Form Submitted Successfully!",
"select_variants": "",
"placeholder_image": "",
"no_of_servings_form_field_msg": "Enter No Of Servings",
"date_form_field_msg": "Event Date",
"placeholder_phone_countrycode": "Country Code"
},
"store_settings_id": "27872469516483",
"productPage_Price": "",
"collectionPage_Price": "",
"searchPage_Price": "",
"homePage_Price": "",
"full_number": "",
"phone_form_field_call": " 919999999999",
"callforprice_label_call_button": "Call for Price",
"form_template": "0",
"phone_default_country_code": "1",
"phone_countrycode_form_field": "Country Code",
"button_form_field": "Submit",
"form_success_message": "Form Submitted Successfully!",
"recaptchasite_key": "",
"recaptchasecret_key": "",
"klaviyo_API": "",
"sendinblue_API": "",
"omnisend_API": "",
"mailchimp_API": "",
"email_service_name": "default",
"sendgrid_api": "",
"sendgrid_sender_email": "example@gmail.com",
"default_sender_name": "novedge.myshopify.com",
"variants_form_field_switch": "1",
"variants_form_field_switch_required": "0",
"image_form_field_switch": "0",
"image_form_field_switch_required": "0",
"customer_auto_email": "0",
"phone_countrycode_form_field_switch": "1",
"phone_countrycode_form_field_switch_required": "1",
"cfp_bg_hvr_colorValue": "#ffffff",
"cfp_text_hvr_colorValue": "#000000",
"hidePriceList": "#shopify-section-collection-template .price",
"products": "",
"show_form_fields": "phone,Countrycode,message,variants",
"required_form_fields": "phone,Countrycode,message"
}
console.log("Call-For-Price SB"); // 8-11-23 - new push button visibility speed
if (typeof cfp_sb_variable !== 'undefined') {
if (cfp_sb_variable == '1') {
var curr_hundle_pid = `8133465407776`;
var payment_status = `active`;
var is_payment_enable = '0';
// global variable
var phone_form_field_call = cfp_configuration.phone_form_field_call;
var callforprice_label_call_button = cfp_configuration.callforprice_label_call_button;
var product_handle_sb = `fine-art-print-100`;
var curr_title_detailpge = ``;
var product_url = `fine-art-print-100`;
var collection_handle_sb = "";
var collection_id = ``;
var curr_hundle_pid = `8133465407776`;
var form_button_display_option = cfp_configuration.form_button_display_option; //show_cfp_button
var btn_name = cfp_configuration.callforprice_label;
var btn_whatsapp = cfp_configuration.callforpriceWhatsapp_label;
var whatsappNumber = cfp_configuration.phone_form_field_whatsapp;
var request_type = 'E-mail';
var cfpwhatsapp = '';
if (form_button_display_option == 'show_cfp_whatsapp') {
btn_name = `
` + btn_whatsapp;
request_type = 'WhatsApp'; cfpwhatsapp = 'cfp-whatsapp';
} else {
btn_name = `
` + btn_name;
}
var hidePriceList_cfp = cfp_configuration.hidePriceList;
var collection_name = ``;
translate_fields = cfp_configuration.translate_fields;
var name_vald = translate_fields.name_vald
var email_blank_vald = translate_fields.email_blank_vald
var email_invalid_vald = translate_fields.email_invalid_vald
var message_vald = translate_fields.message_vald
var quantity_vald = translate_fields.quantity_form_field_msg;
if (typeof quantity_vald == "undefined") { quantity_vald = "Please Enter Quantity"; }
var phone_blank_vald = translate_fields.phone_blank_vald
var servings_vald = ``; var date_vald = ``;
var phone_cc_vald = translate_fields.phone_cc_vald
var country_vald = translate_fields.country_vald
var success_message = cfp_configuration.form_success_message
var variant_blank_vald = translate_fields.variant_form_field_msg
var image_vald = translate_fields.image_vald
var variants_enable = cfp_configuration.variants_enable;
var country_enable = cfp_configuration.country_enable;
var is_redirect = cfp_configuration.is_redirect;
var redirect_page = cfp_configuration.redirect_url;
var required_form_fields = cfp_configuration.required_form_fields;
var phone_countrycode_required = cfp_configuration.phone_countrycode_form_field_switch_required;
var phone_countrycode_show = cfp_configuration.phone_countrycode_form_field_switch;
// quantity fields
var quantity_form_field = cfp_configuration.quantity_form_field;
var quantity_form_field_switch = cfp_configuration.quantity_form_field_switch;
var quantity_form_field_switch_required = cfp_configuration.quantity_form_field_switch_required;
var form_title = cfp_configuration.title;
var submit_btn_name = cfp_configuration.submit;
var form_theme = cfp_configuration.form_theme;
var form_template = cfp_configuration.form_template;
var gdpr_msg = cfp_configuration.gdpr_msg;
var save_customer = cfp_configuration.save_customer;
var form_fields = cfp_configuration.show_form_fields;
var email = cfp_configuration.email;
var pay_status = cfp_configuration.pay_status
var plan_name = cfp_configuration.plan_name
var mail_chimp_enable = cfp_configuration.mail_chimp_enable
var shop = Shopify.shop;
var is_all_products = cfp_configuration.is_all_products;
if (is_all_products == '') { is_all_products = 0; }
var hidePriceList = cfp_configuration.hidePriceList
var enable = cfp_configuration.is_enabled;
var sender_email = cfp_configuration.email;
var cfp_btn_customize_for = cfp_configuration.cfp_btn_customize_for;
var cfp_text_colorValue = cfp_configuration.cfp_text_colorValue;
var cfp_bg_colorValue = cfp_configuration.cfp_bg_colorValue;
var cfp_text_hvr_colorValue = cfp_configuration.cfp_text_hvr_colorValue;
var cfp_bg_hvr_colorValue = cfp_configuration.cfp_bg_hvr_colorValue;
var cfp_custom_css = cfp_configuration.cfp_custom_css;
var cfp_custom_js = cfp_configuration.cfp_custom_js;
var prod_ID_arr, prod_array, col_ID_arr, col_array, prod_array_url = [];
var cfp_current_collection_list_prodPage = `temp`;
var collectionLabelClass = 'cfp-checked';
var product_id_sb = curr_hundle_pid;
var colAllresults = filterConvertArray(ProIDsCollections);
var colIDSresults = cfp_product_collection_Data['collections']
var prodAllresults = cfp_product_collection_Data['products']
var cfp_custom_css_style = ``;
var cfp_custom_js_script = "";
cfp_custom_js_script = document.createElement("script");
cfp_custom_js_script.type = "text/javascript";
cfp_custom_js_script.text = cfp_custom_js;
if (typeof timeDelay == 'undefined') timeDelay = 0; //for settimeout method
if (typeof additional_hide_element == 'undefined') additional_hide_element = ""; //for hiding complex theme element
if (typeof hide_cfp_modal_sec == 'undefined') hide_cfp_modal_sec = 3000;
if (typeof cfp_additional_field == 'undefined') {
var cfp_additional_field = ``;
} else {
var cfp_additional_field = cfp_additional_field;
}
if (typeof (cfp_configuration.phone_default_country_code) !== 'undefined') { var phone_default_country_code = '+' + cfp_configuration.phone_default_country_code; } else { var phone_default_country_code = ''; }
function filterConvertArray(arr) {
var processArray = arr.replace(/(\r\n|\n|\r)/gm, "");
processArray = processArray.replace(/ /g, '');
processArray = processArray.split(',');
const arrResults = processArray.filter(element => {
return element !== "";
});
return arrResults;
}
var loadScript = function (url, callback) {
var script = document.createElement('script');
script.type = 'text/javascript';
if (script.readyState) {
script.onreadystatechange = function () {
if (script.readyState == 'loaded' || script.readyState == 'complete') {
script.onreadystatechange = null;
callback();
}
};
} else {
script.onload = function () {
callback();
};
}
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
};
if (payment_status == 'active' || payment_status == 'trial' || payment_status == 'allow_store') {
is_payment_enable = '1';
if ((typeof jQuery === 'undefined') || (parseFloat(jQuery.fn.jquery) < 1.7)) {
loadScript('//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js', function () {
jQuery191 = jQuery.noConflict(true);
myAppJavaScript_cfp(jQuery191);
loadEventForm(jQuery191);
functionForFilter(jQuery191)
});
} else {
myAppJavaScript_cfp(jQuery);
loadEventForm(jQuery);
functionForFilter(jQuery)
}
}
function myAppJavaScript_cfp($) {
if (enable == "1" && is_payment_enable == "1") {
// alert("myAppJavaScript_cfp")
$('body').append(``);
// alert("hide prices");
setTimeout(function () {
$("body").append(cfp_custom_css_style); $("body").append(cfp_custom_js_script);
CFPcheckForProductPage(); CFPcheckForCollectionPage();
// // cfp buttob_customization
if ((cfp_btn_customize_for !== "") && (cfp_btn_customize_for !== "undefined")) {
$('body').append(``);
$("body").append("")
} else {
$("body").append("")
}
// loadEventForm(); // cfpForm();
// alert("showing");
setTimeout(function(){
$("body").append("");
}, 800)
}, timeDelay)
}
// CFP detailpage Form
function CFPcheckForCollectionPage() {
if ($(".cfp_custom_position").length > 0) {
$(".cfp_custom_position").each(function () {
if (!$(this).hasClass('cfp-checked')) {
var curr_this = $(this);
var product_handle = $(this).attr('product_handle');
var product_url = "/products/" + product_handle;
try {
fetch(product_url + ".json", {
credentials: "same-origin"
}).then(function (data) {
data.json().then(function (data) {
var get_product = data.product;
var cfp_product_on = false;
if (window.location.pathname.indexOf('/products/') == -1) {
if (cfp_product_on != true) {
for (collection_ID of colIDSresults) {
if (collection_ID.replace(/ /g, '') == collection_id) {
cfp_product_on = true;
}
}
}
}
if (is_all_products == "1" && cfp_product_on != true) { cfp_product_on = true; }
if (prodAllresults.includes(get_product.id.toString()) || colAllresults.includes(get_product.id.toString()) && cfp_product_on != true) {
cfp_product_on = true;
}
if (cfp_product_on != true) {
$.each(ProIDsCollectionsTest, function (key, value) {
if (value.includes(get_product.id.toString())) {
var colid = key.split('_')[0]
cfp_product_on = true;
}
})
}
var collection_id_liquid = $(curr_this).attr('collection-id');
if (typeof collection_id_liquid != 'undefined') {
collection_id_liquid = filterConvertArray(collection_id_liquid)
if (cfp_product_on != true) {
for (collection_ID of colIDSresults) {
if ($.inArray(collection_ID.replace(/ /g, ''), collection_id_liquid) != -1) {
cfp_product_on = true;
}
}
}
}
if (enable == "1" && cfp_product_on) {
var current_object = '';
var isButtonPositionFound = true;
specificThemePriceClass()
current_object = appendCFPButtonCollection(curr_this);
if (form_button_display_option == 'show_cfp_button') {
var cfpButtonCollection =
'
';
} else {
var cfpButtonCollection =
'
';
}
if (current_object != '') {
if (!$(curr_this).hasClass(collectionLabelClass)) {
if ($('.cfp-prod-wrapper.' + get_product.handle).length > 0 || current_object.parent().parent().parent().find('.cfp-prod-wrapper-detail').length > 0) {
if ($('.cfp-prod-wrapper.' + get_product.handle).parent().parent().parent().find('.cfp-prod-wrapper.' + get_product.handle).length > 0 || current_object.parent().parent().parent().find('.cfp-prod-wrapper-detail').length > 0) {
$(".cfp_custom_position." + product_handle).html(cfpButtonCollection);
} else {
$(".cfp_custom_position." + product_handle).html(cfpButtonCollection);
}
} else {
$(".cfp_custom_position." + product_handle).html(cfpButtonCollection);
}
current_object.remove();
hideAddToCartOnCollection($(curr_this));
$(curr_this).addClass(collectionLabelClass);
}
}
}
})
})
} catch (e) { }
}
})
} else {
$("a").each(function () {
var curr_this = $(this);
var curr_href = curr_this.attr("href");
var imgg = $(curr_this).closest('div').find('img').first();
if (typeof curr_href !== 'undefined') {
if (curr_href.indexOf("products/") >= 1 && $(this).parent().get(0).tagName != 'LI' && !$(this).hasClass('doNotAdd_cfp')) {
curr_href = curr_href.split("?")[0];
fetch(curr_href + ".json", {
credentials: "same-origin"
}).then(function (data) {
data.json().then(function (data) {
var get_product = data.product;
var cfp_product_on = false;
if (window.location.pathname.indexOf('/products/') == -1) {
//check for collection
if (cfp_product_on != true) {
for (collection_ID of colIDSresults) {
if (collection_ID.replace(/ /g, '') == collection_id) {
cfp_product_on = true;
}
}
}
}
//check all products
if (is_all_products == "1" && cfp_product_on != true) { cfp_product_on = true; /*console.log('all pro match ', cfp_product_on); */ }
//check specific products
if (prodAllresults.includes(get_product.id.toString()) || colAllresults.includes(get_product.id.toString()) && cfp_product_on != true) {
cfp_product_on = true;
}
// check products in collections
if (cfp_product_on != true) {
$.each(ProIDsCollectionsTest, function (key, value) {
if (value.includes(get_product.id.toString())) {
var colid = key.split('_')[0]
cfp_product_on = true;
}
})
}
//check for all collection with theme attr
var collection_id_liquid = $(curr_this).attr('collection-id');
if (typeof collection_id_liquid != 'undefined') {
collection_id_liquid = filterConvertArray(collection_id_liquid)
if (cfp_product_on != true) {
for (collection_ID of colIDSresults) {
if ($.inArray(collection_ID.replace(/ /g, ''), collection_id_liquid) != -1) {
cfp_product_on = true;
}
}
}
}
if (enable == "1" && cfp_product_on) {
var current_object = '';
var cfpProductPrice = 'price';
var isButtonPositionFound = true;
specificThemePriceClass()
if ($(curr_this).find('img').first().length > 0) {
if (!$(curr_this).find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this);
$(curr_this).find('img').first().addClass(collectionLabelClass);
}
} else if ($(curr_this).closest('div').find('img').first().length > 0) {
if (!$(curr_this).closest('div').find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this);
$(curr_this).closest('div').find('img').first().addClass(collectionLabelClass);
}
} else if ($(curr_this).closest('div').parent().find('img').first().length > 0) {
if (!$(curr_this).closest('div').parent().find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this);
$(curr_this).closest('div').parent().find('img').first().addClass(collectionLabelClass);
}
}
else if ($(curr_this).closest('div').parent().parent().find('img').first().length > 0) {
if (!$(curr_this).closest('div').parent().parent().find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this)
$(curr_this).closest('div').parent().parent().find('img').first().addClass(collectionLabelClass);
}
} else if ($(curr_this).closest('div').parent().parent().parent().find('img').first().length > 0) {
if (!$(curr_this).closest('div').parent().parent().parent().find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this)
$(curr_this).closest('div').parent().parent().parent().find('img').first().addClass(collectionLabelClass);
}
} else if ($(curr_this).closest('div').parent().parent().parent().parent().find('img').first().length > 0) {
if (!$(curr_this).closest('div').parent().parent().parent().parent().find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this)
$(curr_this).closest('div').parent().parent().parent().parent().find('img').first().addClass(collectionLabelClass);
}
} else if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find('img').first().length > 0) {
if (!$(curr_this).closest('div').parent().parent().parent().parent().parent().find('img').first().hasClass(collectionLabelClass)) {
current_object = appendCFPButtonCollection(curr_this)
$(curr_this).closest('div').parent().parent().parent().parent().parent().find('img').first().addClass(collectionLabelClass);
}
}
if (form_button_display_option == 'show_cfp_button') {
var cfpButtonCollection =
'
';
} else {
var cfpButtonCollection =
'
';
}
if (current_object != '') {
if (!$(curr_this).hasClass(collectionLabelClass)) {
$(curr_this).addClass(collectionLabelClass);
if ($('.cfp-prod-wrapper.' + get_product.handle).length > 0 || current_object.parent().parent().parent().find('.cfp-prod-wrapper-detail').length > 0) {
if ($('.cfp-prod-wrapper.' + get_product.handle).parent().parent().parent().find('.cfp-prod-wrapper.' + get_product.handle).length > 0 || current_object.parent().parent().parent().find('.cfp-prod-wrapper-detail').length > 0) {
} else {
current_object.after(cfpButtonCollection);
}
//$('.cfp-prod-wrapper.'+get_product.handle)[1].remove();
} else {
current_object.after(cfpButtonCollection);
}
current_object.remove();
hideAddToCartOnCollection($(curr_this));
}
}
}
})
})
};
}
})
}
}
function appendCFPButtonCollection(curr_this) {
var cfpProductPrice = 'price';
var cfpProductMoney = 'money';
var current_object = '';
var isTitleFound = false;
if (typeof (doNotHidePrice) !== 'undefined') { isTitleFound = true; current_object = curr_this.find('test'); }
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').find('div,h3,h2,a,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().find('div,h3,h2,a,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().parent().find('div,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().parent().find('a,h2,h3,h4,h1,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().parent().parent().find('div,h2,h3,a,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().parent().parent().parent().find('div,h2,h3,a,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
if (!isTitleFound) {
var divFind = $(curr_this).closest('div').parent().parent().parent().parent().parent().find('div,h2,h3,a,span,ul,dl,product-price');
current_object = searchCFPprice(divFind);
if (current_object != '') { isTitleFound = true; }
}
return current_object;
}
function searchCFPprice(divFind) {
var cfpProductPrice = 'price';
var cfpProductMoney = 'money';
var current_object = '';
$(divFind).each(function (i) {
var class_title = $(this).attr('class');
if (typeof (class_title) != 'undefined') {
if (class_title.includes(cfpProductPrice) || class_title.includes(cfpProductMoney)) {
current_object = $(this)
// $(this).hide(); // return current_object;
return false;
}
}
});
return current_object;
}
function CFPcheckForProductPage() {
if (window.location.pathname.indexOf('/products/') !== -1) {
var current_collection_list_prodPage = filterConvertArray(cfp_current_collection_list_prodPage);
var csp_total_collection_list_prodPage = colIDSresults;
var cfp_enabled = "no";
//check for collection ids
if (cfp_enabled != 'yes') {
for (collection_name of csp_total_collection_list_prodPage) {
for (current_collection of current_collection_list_prodPage) {
if (current_collection.length >= 2 && collection_name.length >= 2) {
if (current_collection.replace(/ /g, '') == collection_name.replace(/ /g, '')) {
cfp_enabled = "yes";
}
}
}
}
}
//check all products
if (is_all_products == "1" && cfp_enabled != 'yes') { cfp_enabled = "yes"; }
//check specific products
if (prodAllresults.includes(product_id_sb.toString()) && cfp_enabled != "yes") {
cfp_enabled = "yes";
}
if (cfp_enabled == "yes") {
//$('.csp-prod-wrapper.'+product_handle_sb).remove();
if (form_button_display_option == 'show_cfp_button') {
var addtocfpbutton =
'
';
} else {
var addtocfpbutton =
'
';
}
var current_object_detail = '';
$("form").each(function (index) {
var getForm = $(this).attr("action");
if (!(typeof (getForm) !== 'undefined')) {
var getForm = '';
}
if (getForm.includes("/cart/add") && $(".cfp-prod-wrapper-detail").length == 0 && $(".cfp-prod-wrapper-detail-call").length == 0) {
$(this).after(addtocfpbutton);
$(".cfp-prod-button").show();
specificThemePriceClass();
// CFPhidePriceOnAllPages($(this));
current_object_detail = appendCFPButtonCollection($(this));
if (current_object_detail == '') {
CFPhidePriceOnAllPages($(this));
}
console.log("current_object_detail",current_object_detail)
CFPhidePriceOnAllPages($(this)); //hide the price added class //05-09
var detaiilInForm = $('form[action*="/cart/add"]').find('.sb-call-for-price-title,.product-meta__title,.product-meta,.product__title,.gt_heading,.product-title,.product-single__title,.product-single__vendor,.productpage-title-container')
if (!(typeof (doNotHideaddtoCart) !== 'undefined')) {
if (detaiilInForm.length > 0) {
//console.log('sb-call-for-price-title');
$('form[action*="/cart/add"]').find('button').remove(); //someone buys the product so remove the add to cart
$('form[action*="/cart/add"]').find('input[type="submit"][name="button"]').remove(); // remove [name] if not working on any store
} else {
//console.log('else ');
$(this).remove();//someone buys the product so remove the add to cart
$('form[action*="/cart/add"]').remove();
}
}
}
});
//remove price on detail page
if (current_object_detail != '') {
if (checkFreeTheme()) { //for free theme variant change price show issue
$("product-info .no-js-hidden").each(function () { if ($(this).find(".price").length > 0) { $(this).remove(); } })
}
// if (!current_object_detail.parent().hasClass('cfp-detail-checked')) {
// current_object_detail.parent().addClass('cfp-detail-checked');
current_object_detail.remove();
// }
}
}
else {
$('form[action="/cart/add"]').show();
}
}
}
function specificThemePriceClass(){
var originThemeName = window.BOOMR.themeName;
if(originThemeName == 'Warehouse'){
hidePriceList_cfp += ',.price-list,.product-form__price-info';
}
if(originThemeName == 'Influence'){
$("product-price").addClass('price');
hidePriceList_cfp += ',.payment-buttons';
}
if(originThemeName == 'Kalles'){
$(".t4s-sticky-atc__btns").remove();
}
if(originThemeName == 'Wokiee'){
$(".tt-fixed-product-wrapper").remove();
}
if(originThemeName == 'Avone'){
$(".stickyCart").remove();
hidePriceList_cfp += ',.psinglePriceWr';
}
}
function CFPhidePriceOnAllPages(curr_this) {
//if (typeof (doNotHidePrice) !== 'undefined') {return;}
if ($(curr_this).find(hidePriceList_cfp).length > 0) {
$(curr_this).find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().parent().find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().parent().parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().parent().parent().find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().parent().parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().parent().parent().find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().parent().parent().parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().parent().parent().parent().find(hidePriceList_cfp).remove();
} else if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find(hidePriceList_cfp).length > 0) {
$(curr_this).closest('div').parent().parent().parent().parent().parent().find(hidePriceList_cfp).remove();
}
}
function hideAddToCartOnCollection(curr_this) {
var hideCartBuuton = 'form[action*="/cart/add"],.quick-view,.t4s-pr-quickview,.t4s-pr-addtocart,.add-to-cart,.quick-view-btn,.boost-pfs-quickview-btn,.quick-add,.product-form__quantity,.quickbuy-toggle,product-to-cart,.m-product-quickview-button,.tt-btn-quickview,.quickShop,.woodmart-buttons,.product-buttons,.product-cta,.product-cta-upright';
if ((typeof (doNotHideaddtoCart) !== 'undefined')) { var hideCartBuuton = 'NOT-HIDE'; }
// var priceClass = '.price,.money';
var priceClass = '.product-name,.title,.product-title,.sb-call-for-price-title,.product-single__title';
if ($(curr_this).find(hideCartBuuton).length > 0) {
//console.log('1');
if ($(curr_this).children().find(hideCartBuuton).find(priceClass).length <= 0) {
$(curr_this).find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().parent().find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().parent().parent().find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().parent().parent().parent().find(hideCartBuuton).remove();
}
} else if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).length > 0) {
if ($(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).children().find(priceClass).length <= 0) {
$(curr_this).closest('div').parent().parent().parent().parent().parent().find(hideCartBuuton).remove();
}
}
}
setTimeout(function () { hideSearchPrice($) }, 1000);
}
function loadEventForm($) {
// code for theme-2 form************************
var Theme2_data = (productdata) => {
var images = productdata.product.images;
var productImgDivMain = `
`;
if (form_template == '1') {
var finalImageFomrm = productImgDivMain;
$('.slider-image-theme2').html(finalImageFomrm);
}
}
var Create_form_fields = (productdata) => {
var options = productdata.product.options;
for (let i = 0; i < options.length; i++) {
var varianName = options[i].name;
var varianValuesArray = options[i].values;
// select_id=`cfp_sel_${varianName}`;
select_id = varianName;
select_id = select_id.replace("(", "");
select_id = select_id.replace(")", "");
// select_id=select_id.replaceAll(" ","_");
select_id = select_id.replace(/\s/g, "");
select_id = select_id.replace(/\//g, "");
select_id = select_id.replace(/&/g, "and");
select_id = select_id.replace(/:/g, "");
select_id = select_id.replace(/-/g, "");
select_id = select_id.replace(/=/g, "");
var variant_class = "cfp_var" + i;
if (varianName == "Title") {
continue;
}
Select_keyword_placeholder = "Select";
if (Shopify.shop == "shoopsschweiz.myshopify.com") { Select_keyword_placeholder = ""; }
SelectDiv = `
${Select_keyword_placeholder} ${varianName}
`; //created dynamic select option
$('.cfp_variants').prepend(SelectDiv);
var options_html = varianValuesArray.forEach(Create_selectmenu);
function Create_selectmenu(item) {
var options = '
' + item + ' ';
//created dynamic options for select menu
$('#' + select_id).append(options);
}
}
}
// if (pay_status == "active" && plan_name == "cfp_plan_premium") {
if (mail_chimp_enable == "1") {
$('.cfp_subscribe_wrapper').show();
}//} else {$('.cfp_subscribe_wrapper').hide();}
var country_field = (country_enable == "1") ? $('.cfp_country_field').show() : $('.cfp_country_field').hide();
$(document).on('click', '.call-for-price-btn', function (e) {
$('.cfp-parent-wrapper').css("opacity", "0");
$('.cfp_loader').css("display", "block");
$('.text-danger').hide();
$('.formfield').val('');
$('.cfp_variants').empty(); //remove appended field for fresh start
var url = window.location.href;
$('#cfpmodal').css("display", "block");
shop_for_products = Shopify.shop; // url for ajax products variant getting process
shop = Shopify.shop;
var product = $(this).parent().parent().parent().find('.cfp-prod-url').html();
var title = $(this).parent().parent().parent().find('.cfp-prod-title').html();
$('#cfp_product_name').html(title);
productid = $(this).parent().parent().find('.cfp-prod-id').html();
producthandle = $(this).parent().parent().find('.cfp-prod-handle').text();
producturl = location.hostname + product;
AjaxURL = 'https://' + shop_for_products + '/products/' + producthandle + '.json';
var request = $.ajax({
url: AjaxURL,
type: "GET",
dataType: "json",
beforeSend: function () {
$('.cfp_loader').css("opacity", "1");
},
});
request.done(function (productdata) {
var myJSON = JSON.stringify(productdata);
productdata = JSON.parse(myJSON);
if (variants_enable == "1") {
Create_form_fields(productdata);
}
if (form_template == "1") {
Theme2_data(productdata);
// New initialization-------------------
}
$('.cfp_loader').css("display", "none");
$('.cfp-parent-wrapper').css("opacity", "1");
});
request.fail(function (productdata) {
$('.cfp_loader').css("display", "none");
$('.cfp-parent-wrapper').css("opacity", "1");
});
$('#cfpname').attr('placeholder', translate_fields.placeholder_name);
$('#cfpemail').attr('placeholder', translate_fields.placeholder_email);
$('#cfpphone').attr('placeholder', translate_fields.placeholder_phone);
$('#cfpcountrycode').attr('placeholder', translate_fields.placeholder_phone_countrycode);
$('#cfp_country').attr('placeholder', translate_fields.select_country);
$('#cfpmessage').attr('placeholder', translate_fields.placeholder_your_msg);
$('#country_first_option').text(translate_fields.select_country);
$('#cfpquantity').attr('placeholder', cfp_configuration.quantity_form_field);
if (!(phone_countrycode_show == "0")) {
$('#cfpcountrycode').val(phone_default_country_code);
}
if (form_fields.includes("venue")) {
$('#venue').attr('placeholder', cfp_configuration.venue_form_field);
}
});
var span = document.getElementsByClassName("close_sb_CFP_popup")[0];
$(document).on('click', '.close_sb_CFP_popup', function () {
$('#cfpmodal').css("display", "none");
});
$(document).on('click', '.submitReq', function () {
$('.text-danger').remove();
// whatsapp msg
var whatsappvals = ``;
var wpMessage = ``;
var email_regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
var name1 = $('#cfpname').val();
var title = $('#cfp_product_name').text();
var email = $('#cfpemail').val();
var quantity = $('#cfpquantity').val();
whatsappvals += `Name : ${name1}%0D%0AE-mail : ${email} %0D%0A`;
if ($("#cfpphone").length) {
var phone = $('#cfpphone').val();
if ($("#cfpcountrycode").length) {
var cfpcountrycode = $("#cfpcountrycode").val();
phone = cfpcountrycode + '' + phone;
}
phone = phone.replace(/ /g, '')
var countrycode_val = phone.match(/^\+\d{1,3}\d{9,15}$/);
whatsappvals += `Phone : ${phone}%0D%0A`;
}
if ($("#cfpmessage").length) { var message = $('#cfpmessage').val(); wpMessage += `Message : ${message}`; };
if ($("#venue").length) { var venue = $('#venue').val(); }
if ($("#cfp_country").length) { var country = $('#cfp_country').val(); whatsappvals += `Country : ${country}%0D%0A`; }
if (form_fields.includes("quantity")) { if ($('#cfpquantity').val().length) { whatsappvals += `Quantity : ${quantity}%0D%0A`; } }
var ownermail = sender_email;
var cfp_file = $("#cfp_image").val();
var gcaptcha = $('.g-recaptcha-response').val();
var var_Array = $('.cfp_var_data');
var VariantsArray = new Array();
var wpVariants = '';
for (var i = 0; i < var_Array.length; i++) {
var Var_name = $(var_Array[i]).attr('id');
var Var_value = $(var_Array[i]).val();
var var_collection = {
'Var_name': Var_name,
'Var_value': Var_value
};
wpVariants += Var_name + " : " + Var_value + "%0D%0A";
VariantsArray.push(var_collection);
}
var jObject = {};
jObject = JSON.stringify(VariantsArray);
if (!VariantsArray) {
// VariantsArray="abcd";
}
/* validation controllers*/
count_name = true;
if (name1.length == 0) {
$('#cfpname').after(`
${name_vald} `);
count_name = false;
}
if (email.length == 0) {
$('#cfpemail').after(`
${email_blank_vald} `);
count_name = false;
}
else {
if (!email_regex.test(email)) {
$('#cfpemail').after(`
${email_invalid_vald} `);
count_name = false;
}
}
if (required_form_fields.includes("message")) {
if (message.length == 0) {
$('#cfpmessage').after(`
${message_vald} `);
count_name = false;
}
}
if (required_form_fields.includes("quantity")) {
if ($('#cfpquantity').val().length == 0) {
$('#cfpquantity').after(`
${quantity_vald} `);
count_name = false;
} else if ($('#cfpquantity').val() <= 0) {
$('#cfpquantity').after(`
${quantity_vald} `);
count_name = false;
}
}
if (required_form_fields.includes("phone")) {
if (phone.length <= 9) {
$('#cfpphone').after(`
${phone_blank_vald} `);
count_name = false;
} else if (!countrycode_val && phone_countrycode_required != "0") {
var country_code_vald_hide_shops = ["mirage-sari-center.myshopify.com", "prim-and-pro-commercial-cleaning.myshopify.com", "rp-imaging.myshopify.com", "flooring-for-less-online.myshopify.com", "pessoa-joias.myshopify.com", "jessica-flinn-designs.myshopify.com", "no-42-interiors.myshopify.com", "high-tech-delivery.myshopify.com", "i-dance-contemporary.myshopify.com", "bohl-companies.myshopify.com", "spread-event-co.myshopify.com", "joombo-co.myshopify.com", "portabo.myshopify.com", "production-case.myshopify.com", "w-rltd.myshopify.com", "robs-furniture-mattresses.myshopify.com", "myartph.myshopify.com"];
if ($.inArray(shop, country_code_vald_hide_shops) == -1) // if shop is not present in array only then validate for mobile field
{
$('#cfpphone').after(`
${phone_cc_vald} `);
count_name = false;
}
}
}
if (required_form_fields.includes("venue")) {
if (message.length == 0) {
$('#venue').after(`
${translate_fields.venue_vald} `);
count_name = false;
}
}
if (required_form_fields.includes("country")) {
if (!country) {
$('#cfp_country').after(`
${country_vald} `);
count_name = false;
}
}
if (Shopify.shop == 'lacava-specialty-coffee-roastery.myshopify.com') {
count_name = true;
}
if (required_form_fields.includes("variants")) {
var variants_validation = [".cfp_var0", ".cfp_var1", ".cfp_var2"];
for (variant_vald of variants_validation) {
if ($(variant_vald).length > 0) {
var variant_value = $(variant_vald).val();
if (variant_value == null) {
$(variant_vald).after();
cvarian_vald = "abcd";
$(variant_vald).after(`
${variant_blank_vald} `);
count_name = false;
}
}
}
}
if (required_form_fields.includes("image")) {
if (!cfp_file) {
$('#cfp_image').after(`
${image_vald} `);
count_name = false;
}
}
if (Shopify.shop == "bluesheepbakeshop.myshopify.com" || Shopify.shop == "easy2-buy-shop.myshopify.com") //cfp_adt_flds
{
var servings_no = $('#add_serving_no').val();
var event_date_modal = $('#add_event_date').val();
if (required_form_fields.includes("servings")) {
if (servings_vald == '') {
servings_vald = 'This field required';
}
if (servings_no.length == 0) {
$('#add_serving_no').after(`
${servings_vald} `);
count_name = false;
}
}
if (required_form_fields.includes("date")) {
if (date_vald == '') {
date_vald = 'This field required';
}
if (event_date_modal.length == 0) {
$('#add_event_date').after(`
${date_vald} `);
count_name = false;
}
}
}
if (count_name) {
var cfp_form = $('.sb_cfp ')[0];
var cfo_form__data = new FormData(cfp_form);
cfo_form__data.append('name', name1);
cfo_form__data.append('email', email);
cfo_form__data.append('phone', phone);
cfo_form__data.append('message', message);
cfo_form__data.append('pid', producturl);
cfo_form__data.append('productid', productid);
cfo_form__data.append('message', message);
cfo_form__data.append('shop', shop);
cfo_form__data.append('senderemail', ownermail);
cfo_form__data.append('country', country);
cfo_form__data.append('quantity', quantity);
cfo_form__data.append('gcaptcha', gcaptcha);
cfo_form__data.append('VariantsArray', VariantsArray);
cfo_form__data.append('title', title);
cfo_form__data.append('request_type', request_type);
var cfp_allowed_files = ["png", "jpeg", "jpg", "gif", "csv", "pdf", "docs", "doc", "xlsx"];
if ($('#cfp_image').length) {
var cfp_image_length = document.getElementById('cfp_image').files.length;
for (var x = 0; x < cfp_image_length; x++) {
var inq_image = document.getElementById('cfp_image').files[x];
var cfp_fle_extension = inq_image['name'].split('.').pop();
if (cfp_allowed_files.includes(cfp_fle_extension.toLowerCase())) {
cfo_form__data.append("cfp_file[]", document.getElementById('cfp_image').files[x]);
}
else {
$('#cfp_image').after(`
${image_vald} `);
return false;
}
}
}
// send whatsapp message
if (form_button_display_option == 'show_cfp_whatsapp') {
const mediaQuery = window.matchMedia("(max-width: 425px)");
var deviceDetect = false;
if (mediaQuery.matches) { deviceDetect = true; }
var whatsappMsg = "Product : https://" + producturl + "%0D%0A" + wpVariants + "%0D%0A%0D%0A" + whatsappvals + wpMessage;
whatsAppChatRedirection(whatsappNumber, deviceDetect, whatsappMsg);
}
if ($("#cfp_subscribe").length) {
if ($('#cfp_subscribe').is(':checked')) {
cfo_form__data.append('customer_subscribe', "1");
}
}
$.ajax({
url: 'https://setubridgeapps.com/call-for-price/app/src/public/submitreq_new',
type: 'POST',
data: cfo_form__data,
processData: false,
contentType: false,
cache: false,
beforeSend: function () {
$('.cfp_loader').css("display", "block");
$('.cfp_loader').css("opacity", "1");
$('.cfp-parent-wrapper').css("opacity", "0");
},
success: function (data) {
form_curr_html = $('.sb_cfp').html();
$('.cfp_loader').css("display", "none");
// return false;
var shop = Shopify.shop;
$('#cfpmodal .cfp_field ,#cfpmodal textarea').val(' ');
$('.cfp-slider-wrapper').before(`
${success_message}
`);
if (Shopify.shop == "amtrac-furnishings.myshopify.com") { $(".sb_cfp").html('
Thank you for your interest.
We will be in contact with you within 24 hours.
'); }
$('.cfp-parent-wrapper').css("opacity", "1");
$('.sb_cfp input[type=text]').val('');
// return false;
setTimeout(function () {
$('#cfpmodal .alert-success').remove();
$('#cfpmodal').hide();
if (Shopify.shop == "amtrac-furnishings.myshopify.com") { $(".sb_cfp").html(form_curr_html); }
var shop = Shopify.shop;
if (is_redirect == "1") {
redirect_page = redirect_page.trim();
if (redirect_page.length == 0) {
return false;
}
window.open(redirect_page, "_self");
}
}, hide_cfp_modal_sec);
},
error: function (error) {
}
});
} else {
return false;
}
});
cfpForm($);
}
function cfpForm($) {
if (form_theme == '1' && form_template == '1') {
var form_design = `
#cfpmodal .slider-image-theme2 { width: 45%; }
.call-for-price-modal-wrapper .cfp-modal-content { position: relative; background-color: #fefefe; margin: auto; margin-bottom: 10%; padding: 0; width: 850px !important; box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); -webkit-animation-name: animatetop; -webkit-animation-duration: 0.4s; animation-name: animatetop; animation-duration: 0.4s; }
#cfpmodal .cfp-modal-body { width: 55% !important; } #cfpmodal .cfp-slider-wrapper {display: flex !important;margin: 25px !important;}.call-for-price-modal-wrapper .cfp-modal-header {background-color: #fff;color: #333333d9;}.cfp-modal-body {background-color: #fff;}.call-for-price-modal-wrapper .cfp-modal-header {padding: 13px 0px;border-bottom: 1px solid #e7e6e6;}.alert {margin-top: 10px;}select.cfp_var_data {font-size: 15px!important;color: #7e7d7d!important;background-color: #fff !important;padding-bottom: 8px;}.cfp-modal-body .form-group input, .cfp-modal-body .form-group textarea, .cfp-modal-body .form-group select {border: none!important;border-bottom: 1px solid #e7e6e6!important;}.cfp-modal-body .form-group input:focus-visible, .cfp-modal-body .form-group textarea:focus-visible, .cfp-modal-body .form-group select:focus-visible {outline: none;box-shadow: none;border-bottom: 1px solid #545151!important;}.cfp_subscribe_wrapper {display: flex;align-items: flex-start;}.form-group.file {margin-top: -8px;}.country_field {padding: 15px 0px 10px 0;}select.cfp_var_data {padding: 15px 0px 10px 0;}.form-group .uploade {margin-top: -8px!important;}.call-for-price-modal-wrapper label,.call-for-price-modal-wrapper input,.call-for-price-modal-wrapper textarea {padding: 15px 0px 10px 5px!important;}.call-for-price-modal-wrapper .cfp-modal-body {padding: 5px 20px 20px;}.call-for-price-modal-wrapper .cfp-modal-body{margin: -5px 0 0 20px!important;}.call-for-price-modal-wrapper .cfp-modal-header h3 {text-align: left !important;padding-left: 22px;margin: 0;font-weight: 700;font-family: inherit;}
@media (max-width:900px) { .call-for-price-modal-wrapper .cfp-modal-content { width:80vw !important; } } #cfpmodal .cfp-slider-wrapper{display: flex;margin: 25px }#cfpmodal .slider-image-theme2{width:45%;}.flickity-enabled {position: relative;}.flickity-enabled:focus {outline: none;}.flickity-viewport {overflow: hidden;position: relative;height: 100%;}.flickity-slider {position: absolute;width: 100%;height: 100%;}.flickity-enabled.is-draggable {-webkit-tap-highlight-color: transparent;tap-highlight-color: transparent;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.flickity-enabled.is-draggable .flickity-viewport {cursor: move;cursor: -webkit-grab;cursor: grab;}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {cursor: -webkit-grabbing;cursor: grabbing;}.flickity-prev-next-button {position: absolute;top: 50%;width: 30px;height: 30px;border: none;border-radius: 50%;background: white;background: hsla(0, 0%, 100%, 0.75);cursor: pointer;-webkit-transform: translateY(-50%);transform: translateY(-50%);}.flickity-prev-next-button:hover {background: white;}.flickity-prev-next-button:focus {outline: none;box-shadow: 0 0 0 5px #09F;}.flickity-prev-next-button:active {opacity: 0.6;}.flickity-prev-next-button.previous {left: 0;}.flickity-prev-next-button.next {right: 0;}*/.flickity-prev-next-button:disabled {opacity: 0.3;cursor: auto;}.flickity-prev-next-button svg {position: absolute;left: 20%;top: 20%;width: 60%;height: 60%;}.flickity-prev-next-button .arrow {fill: #333;}.carousel {background: #FAFAFA;}.carousel-cell {width: 100%;margin-right: 8px;background: transparent ;border-radius: 5px;}.carousel-nav .carousel-cell {height: 90px;width: 100px;margin: 9px;text-align: center;}.carousel-main img {display: block;margin: 0 auto;}.cfp-slider-container {max-width: 672px;margin: 0 auto;background: #e6e4e4b3;}.carousel-main img,.carousel-nav .carousel-cell img {width:100%;height:100%;}
.flickity-enabled {position: relative;}.flickity-enabled:focus {outline: none; }.flickity-viewport {overflow: hidden;position: relative;height: 100%;}.flickity-slider {position: absolute;width: 100%;height: 100%;}
.flickity-enabled.is-draggable {-webkit-tap-highlight-color: transparent;tap-highlight-color: transparent;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}
.flickity-enabled.is-draggable .flickity-viewport {cursor: move;cursor: -webkit-grab;cursor: grab;} .flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {cursor: -webkit-grabbing;cursor: grabbing;} .flickity-prev-next-button {position: absolute;top: 50%;width: 30px;height: 30px;border: none;border-radius: 50%;background: white;background: hsla(0, 0%, 100%, 0.75);cursor: pointer;-webkit-transform: translateY(-50%);transform: translateY(-50%);}
.flickity-prev-next-button:hover {background: white;} .flickity-prev-next-button:focus {outline: none;box-shadow: 0 0 0 5px #09F;} .flickity-prev-next-button:active {opacity: 0.6;}
.flickity-prev-next-button.previous {left: 0;} .call-for-price-modal-wrapper .submit-btn{text-align: left !important;} @media screen and (min-width: 320px) and (max-width: 480px){.call-for-price-modal-wrapper .submit-btn{text-align: center !important;}}
*/.flickity-prev-next-button:disabled {opacity: 0.3;cursor: auto;} .flickity-prev-next-button svg {position: absolute;left: 20%;top: 20%;width: 60%;height: 60%;}.flickity-prev-next-button .arrow {fill: #333;}
* {box-sizing: border-box;} .carousel {background: #FAFAFA;}.carousel-cell {width: 100%;margin-right: 8px;background: transparent ;border-radius: 5px;}.carousel-nav .carousel-cell {height: 90px;width: 100px;margin: 9px;text-align: center;}
.carousel-main img {display: block;margin: 0 auto;}.cfp-slider-container {max-width: 672px;margin: 0 auto;background: #e6e4e4b3;}.carousel-main img,.carousel-nav .carousel-cell img {width: 100%;height: 100%;} `;
} else if (form_theme == '1' && form_template == '0') {
var form_design = `
#cfpmodal .cfp-modal-body {width: 100%; padding: 20px !important;}.call-for-price-modal-wrapper .cfp-modal-header {background-color: #fff;color: #333333d9;}.cfp-modal-body {background-color: #fff;}.call-for-price-modal-wrapper .cfp-modal-header {padding: 13px 0px;border-bottom: 1px solid #e7e6e6;}.alert {margin-top: 10px;}select.cfp_var_data {font-size: 15px!important;color: #7e7d7d!important;background-color: #fff !important;padding-bottom: 8px;}.cfp-modal-body .form-group input, .cfp-modal-body .form-group textarea, .cfp-modal-body .form-group select {border: none!important;border-bottom: 1px solid #e7e6e6!important;}.cfp-modal-body .form-group input:focus-visible, .cfp-modal-body .form-group textarea:focus-visible, .cfp-modal-body .form-group select:focus-visible {outline: none;box-shadow: none;border-bottom: 1px solid #545151!important;}.cfp_subscribe_wrapper {display: flex;align-items: flex-start;}.form-group.file {margin-top: -8px;}.country_field {padding: 15px 0px 10px 0;}select.cfp_var_data {padding: 15px 0px 10px 0;}.form-group .uploade {margin-top: -8px!important;}.call-for-price-modal-wrapper label,.call-for-price-modal-wrapper input,.call-for-price-modal-wrapper textarea {padding: 15px 0px 10px 5px!important;}#cfpmodal .cfp-parent-wrapper{padding: 0 0 1px 0 !important;} `;
} else {
var form_design = `.call-for-price-modal-wrapper .cfp-modal-header { background-color: #333333d9; color: #333333d9;}
.call-for-price-modal-wrapper .cfp-modal-header { padding: 16px 16px; }
.cfp-modal-body { background-color:#e6e4e4b3; padding: 15px 21px 25px 20px !important; }
.call-for-price-modal-wrapper .cfp-modal-header h3 {color:#fff; } .cfp_subscribe_wrapper{display: flex;align-items: flex-start;}
.call-for-price-modal-wrapper label, .call-for-price-modal-wrapper input, .call-for-price-modal-wrapper textarea{padding: 10px 0px 10px 10px !important;}
.country_field{padding: 10px 0 10px 6px !important; border: none;} form .form-group { padding-top: 8px; }
select.cfp_var_data{margin: 0!important;width: 100%;height: 35%;line-height: normal!important;font-size: 15px!important;color: #7e7d7d!important;background-color: #fff !important;padding: 10px 0 10px 6px !important;}
#cfpmodal .cfp-slider-wrapper{ padding: 0 important; }
.cfp-modal-body .form-popup{padding: 20px !important;}#cfp_product_name{padding: 10px 0 0 20px !important;}@media (max-width:460px) {.cfp-modal-body .form-popup{padding: 10px !important;}#cfp_product_name{padding: 5px 0 0 10px !important;}}`;
}
var cfp_form_css = ``;
if (form_fields.includes("phone")) {
if (!(phone_countrycode_show == "0")) {
var cfp_phone = `
`;
} else {
var cfp_phone = `
`;
}
} else {
var cfp_phone = '';
}
if (form_fields.includes("country")) {
var cfp_country = `
Select Country
Afghanistan
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua & Barbuda
Argentina
Armenia
Aruba
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
Bonaire
Bosnia & Herzegovina
Botswana
Brazil
British Indian Ocean Ter
Brunei
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Canary Islands
Cape Verde
Cayman Islands
Central African Republic
Chad
Channel Islands
Chile
China
Christmas Island
Cocos Island
Colombia
Comoros
Congo
Cook Islands
Costa Rica
Cote DIvoire
Croatia
Cuba
Curacao
Cyprus
Czech Republic
Denmark
Djibouti
Dominica
Dominican Republic
East Timor
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
Estonia
Ethiopia
Falkland Islands
Faroe Islands
Fiji
Finland
France
French Guiana
French Polynesia
French Southern Ter
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Great Britain
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guinea
Guyana
Haiti
Hawaii
Honduras
Hong Kong
Hungary
Iceland
Indonesia
India
Iran
Iraq
Ireland
Isle of Man
Israel
Italy
Jamaica
Japan
Jordan
Kazakhstan
Kenya
Kiribati
Korea North
Korea South
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macau
Macedonia
Madagascar
Malaysia
Malawi
Maldives
Mali
Malta
Marshall Islands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Midway Islands
Moldova
Monaco
Mongolia
Montserrat
Morocco
Mozambique
Myanmar
Nambia
Nauru
Nepal
Netherland Antilles
Netherlands (Holland, Europe)
Nevis
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Norway
Oman
Pakistan
Palau Island
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn Island
Poland
Portugal
Puerto Rico
Qatar
Republic of Montenegro
Republic of Serbia
Reunion
Romania
Russia
Rwanda
St Barthelemy
St Eustatius
St Helena
St Kitts-Nevis
St Lucia
St Maarten
St Pierre & Miquelon
St Vincent & Grenadines
Saipan
Samoa
Samoa American
San Marino
Sao Tome & Principe
Saudi Arabia
Senegal
Seychelles
Sierra Leone
Singapore
Slovakia
Slovenia
Solomon Islands
Somalia
South Africa
Spain
Sri Lanka
Sudan
Suriname
Swaziland
Sweden
Switzerland
Syria
Tahiti
Taiwan
Tajikistan
Tanzania
Thailand
Togo
Tokelau
Tonga
Trinidad & Tobago
Tunisia
Turkey
Turkmenistan
Turks & Caicos Is
Tuvalu
Uganda
United Kingdom
Ukraine
United Arab Emirates
United States of America
Uruguay
Uzbekistan
Vanuatu
Vatican City State
Venezuela
Vietnam
Virgin Islands (Brit)
Virgin Islands (USA)
Wake Island
Wallis & Futana Is
Yemen
Zaire
Zambia
Zimbabwe
`;
} else { var cfp_country = ''; }
if (form_fields.includes("quantity")) { var cfp_quantity = `
`; } else { var cfp_quantity = ''; }
if (form_fields.includes("message")) { var cfp_message = `
`; } else { var cfp_message = ''; }
if (form_fields.includes("image")) { var cfp_image = `
`; } else { var cfp_image = ``; }
if (save_customer == '1') { var gdpr_message = `
`; } else { var gdpr_message = ``; }
if (form_fields.includes("venue")) { var venue_name = `
`; cfp_additional_field += venue_name; }
var cfp_form = `
`;
$("body").append(cfp_form_css);
$("body").append(cfp_form);
}
function setCookieCFP(name, value, exdays) {
const d = new Date();
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
let expires = "; expires=" + d.toUTCString();
document.cookie = name + "=" + value + ";" + expires + "; path=/";
}
function getCookieCFP(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}
return null;
}
function eraseCookieCFP(name) {
document.cookie = name + '=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
//sending whatsapp msg code
function whatsAppChatRedirection(number, md, text) {
var number2 = number.replace(/ +/g, "");
if (md) {
var mob = "https://wa.me/" + number2 + "?text=" + text;
window.open(mob, "_blank");
} else {
var web = "https://web.whatsapp.com/send?phone=" + number2 + "&text=" + text;
window.open(web, "wupwindow", "toolbar=yes,scrollbars=yes,resizable=yes,top=130,left=260,width=900,height=500");
}
}
function checkFreeTheme() {
var sb_cfp_freeThemes = ['Dawn', 'Refresh', 'Craft', 'Sense', 'Studio', 'Crave', 'Origin', 'Ride', 'Taste', 'Spotlight', 'Colorblock', 'Publisher'];
if (sb_cfp_freeThemes.includes(window.BOOMR.themeName)) {
return true;
}
return false;
}
function functionForFilter($) {
var priceAndCartBtnClasses = ".sb-cfp-hidecartbtn_loading, .sb-cfp-hideprice_loading, .price, product-form, .quick-add__submit, .product-item__action-button, .product-form .product-add, .boost-pfs-addtocart-wrapper, .product-item .actionform, .price-product, .product-price__price, .product-item__price-wrapper, .product-item--price, .product_price, .boost-pfs-filter-product-item-price, .single_product__price, .product--price-wrapper, .product-card__price, .product-form--price-wrapper, .product-item--price, .product-item__price, .grid-product__price-wrap, .grid-product__price, .product-list-item-price, .productitem--price, .product-form--price-wrapper, .card-information .price , .price-item price-item--regular, .price__regular, .price__container";
var showPrice = $("body").append("");
if (checkFreeTheme()) {
console.log("priceAndCartBtnClasses",checkFreeTheme())
$('.hidePrice').hide();
$('body').append(``);
// $(priceAndCartBtnClasses).addClass('hidePrice');
// show button on availability filter***************
$(document).on('click', ".js-filter, .active-facets", function () {
setTimeout(function () {
myAppJavaScript_cfp($)
}, 1300);
setTimeout(function () {
$(priceAndCartBtnClasses).removeClass('hidePrice');
showPrice
}, 2000);
});
// Show button on price filter**********************
$(document).on('keyup', ".field__input, .active-facets", function () {
$(priceAndCartBtnClasses).hide();
// $(priceAndCartBtnClasses).addClass('hidePrice');
setTimeout(function () {
myAppJavaScript_cfp($);
}, 1200);
setTimeout(function () {
$(priceAndCartBtnClasses).removeClass('hidePrice');
showPrice
}, 2023);
});
// category wise filter*****************************
$(document).on('change', ".facet-filters__sort", function () {
setTimeout(function () {
myAppJavaScript_cfp($);
}, 1300);
setTimeout(function () {
$(priceAndCartBtnClasses).removeClass('hidePrice');
showPrice
}, 2000);
});
// Recommendaed Product*****************************
if (`index` == "product") {
if ($('body').find('.related-products__heading')) {
setTimeout(function () {
myAppJavaScript_cfp($);
}, 1300);
setTimeout(function () {
$(priceAndCartBtnClasses).removeClass('hidePrice');
showPrice
}, 1800);
}
}
//Remove Filter Function*****************
$(document).on('click', ".active-facets, .active-facets__button-wrapper, .active-facets__button-inner", function () {
setTimeout(function () {
myAppJavaScript_cfp($)
}, 1300);
setTimeout(function () {
$(priceAndCartBtnClasses).removeClass('hidePrice');
showPrice
}, 2000);
});
}
}
function hideSearchPrice($) {
$('.predictive-search__item-content .price').hide();
}
function checkPayemntCFP($) {
var sb_payment_status_check = getCookieCFP('sb_payment_status_check_cfp');
if (sb_payment_status_check == null) {
$.ajax({
url: "https://setubridgeapps.com/call-for-price/app/src/public/checkPaymentStatus",
type: "GET",
data: {
shop: shop
},
cache: false,
success: function (response) {
if (response) {
response = JSON.parse(response);
if (response.result.status == "active") {
setCookieCFP('sb_payment_status_check_cfp', 'active', 1);
// myAppJavaScript_cfp($);
// loadEventForm($);
// functionForFilter($)
} else {
setCookieCFP('sb_payment_status_check_cfp', 'not_set', 1);
}
} else {
setCookieCFP('sb_payment_status_check_cfp', 'not_set', 1);
}
//for Plus customer
if (response.status == '1') {
setCookieCFP('sb_payment_status_check_cfp', 'active', 1);
// myAppJavaScript_cfp($);
// loadEventForm($);
// functionForFilter($)
}
}
});
}
}
}
}
// notes
// 1. add (doNotAdd_cfp) class to a tag where you dont want checking
// 2. custom position for cfp button on collection page (this will not check any a tag)
//
// 3. if do not want to hide then add this in theme.liquid
// var doNotHidePrice = true ;
// 4. add custom fields to form using this code add in theme.liquid
// var cfp_additional_field=`
`;
// 5. load functions late for store add this in theme.liquid
// var timeDelay = 5000;
// 6. if do not want to hide Add to cart button add this in theme.liquid
// var doNotHideaddtoCart = true;