'); $('.breadcrumb').after('
'); $('.selected-filtes').appendTo('.filter-data-selected'); //1st time on page load if ($('#ajax-content-wrapper').length == 0) { $('.product-layoutrow').wrap('
'); $('.bottom-pagination').appendTo('#ajax-content-wrapper'); } if (is_search_page == '1' && is_ajax_filter == '1') { ajaxLoadContent('https://www.dkappliances.com/index.php?route=ripm/category/ajax_load&category_id=2&limit=15&allfilter=1', true); } else { trigerAlldefaultBindedevents(); } $(window).scroll(function() {if (!($('footer').isInViewport())) {$("#button-filter3, #button-filter4").fadeIn(300);} else {$("#button-filter3, #button-filter4").fadeOut(300);}}); if(isMultiSelectFilter == '1') { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); } toggleStockSort(); }); // Function to check if current element is in viewport or not $.fn.isInViewport = function() { var elementTop = $(this).offset().top; var elementBottom = elementTop + $(this).outerHeight(); var viewportTop = $(window).scrollTop(); var viewportBottom = viewportTop + $(window).height(); return elementBottom > viewportTop && elementTop < viewportBottom; }; function cloneFilterMobile() { var slideroption = { range: true, min: parseInt($(".price_min_limit").val()), max: parseInt($(".price_max_limit").val()), step: parseInt($(".price_steps").val()), values: [parseInt($(".price_min").val()), parseInt($(".price_max").val())], slide: function(event, ui) { $(".amount").val("$" + ui.values[0] + " - $" + ui.values[1]); $(".price_min").val(ui.values[0]); $(".price_max").val(ui.values[1]); }, stop: function(event, ui) { if(isMultiSelectFilter == '1' && is_search_page == '0') { $('#column-left').addClass('doNotFilter'); $('#mobile-filter-tags').addClass('doNotFilter'); } else { $('#button-filter').trigger('click'); } } }; $(".slider-range").slider(slideroption); var desktop_filter = $('#column-left .panel.filter'); $('#mobile-filter-tags').html(desktop_filter.clone(true)); let mobile_filter_html = '
'; if(isMultiSelectFilter == '1' && is_search_page == '0') { mobile_filter_html += '
'; } $('#mobile-filter-tags').append(mobile_filter_html); $('#button-reset').on('click', function() { $('.panel.filter').find('input[type=checkbox]:checked').removeAttr('checked'); $('#button-filter').trigger('click'); }); $('#button-filter2').on('click', function() { $('#button-filter').trigger('click'); }); $('#button-filter4').unbind('click').on('click', function() { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); filterData('mobile-filter-tags'); }); $('.product-layoutrow .product-details .caption-grid .caption').matchHeight(); $('.ripm-featured .product-layoutrow .product-thumb .image').matchHeight(); $('.ripm-featured .product-layoutrow .product-thumb .caption').matchHeight(); $('.recently-viewed .product-layoutrow .caption').matchHeight(); $('.featured.featured-tabs .product-details .caption-grid .caption').matchHeight(); } var filterData = function(containerId) { var filter = []; var customfilter = {}; var customfilterstring = []; var filterGroup = []; var price = []; var price_min = parseInt($('#' + containerId + " .price_min").val()); var price_max = parseInt($('#' + containerId + " .price_max").val()); var price_min_limit = parseInt($('#' + containerId + " .price_min_limit").val()); var price_max_limit = parseInt($('#' + containerId + " .price_max_limit").val()); if (price_min > 0 || price_max > 0) { if (price_min != price_min_limit || price_max != price_max_limit) { price.push($('#' + containerId + " .price_min").val()); price.push($('#' + containerId + " .price_max").val()); } } $('#' + containerId + ' input[name^=\'filter\']:checked').each(function(element) { var group = $(this).attr('data-gname'); if (this.value) { if (customfilter[group] == undefined) { customfilter[group] = { value: this.value }; } else { customfilter[group] = { value: customfilter[group].value + ',' + this.value }; } } // filter.push(this.value); }); $('#' + containerId + ' select[name^=\'filter\']').each(function(element) { var group = $(this).attr('data-gname'); if (this.value) { if (customfilter[group] == undefined) { customfilter[group] = { value: this.value }; } else { customfilter[group] = { value: customfilter[group].value + ',' + this.value }; } } // filter.push(this.value); }); $('#' + containerId + ' input[name^=\'filterGroupId\']').each(function(element) { var filter_first_key = 'filterGroupStart' + this.value; var filter_first_value = $('#' + containerId + ' input[name^=\'' + filter_first_key + '\']').val(); var filter_secnd_key = 'filterGroupEnd' + this.value; var filter_secnd_value = $('#' + containerId + ' input[name^=\'' + filter_secnd_key + '\']').val(); if (filter_first_value != '' || filter_secnd_value != '') { filterGroup.push(this.value + '_' + filter_first_value + '-' + filter_secnd_value); } }); for (var item in customfilter) { customfilterstring.push(item + "=" + customfilter[item].value); } var currentURL = 'https://www.dkappliances.com/Appliances'; var ajax_content_url = 'https://www.dkappliances.com/index.php?route=ripm/category/ajax_load&category_id=2'; var ajax_filter_url = 'https://www.dkappliances.com/index.php?route=ripm/module/filter/get_filter&category_id=2&froute=ripm/category'; if (isResetButtonPress === false) { if (customfilterstring.length > 0) { ajax_content_url += '&' + customfilterstring.join('&'); ajax_filter_url += '&' + customfilterstring.join('&'); currentURL += '&' + customfilterstring.join('&'); } } else { isResetButtonPress = false; } if (filterGroup.length > 0) { ajax_content_url += '&attributes_range=' + filterGroup.join(','); ajax_filter_url += '&attributes_range=' + filterGroup.join(','); currentURL += '&attributes_range=' + filterGroup.join(','); } if (price.length > 0) { ajax_content_url += '&filter[price]=' + price.join(','); ajax_filter_url += '&filter[price]=' + price.join(','); currentURL += '&filter[price]=' + price.join(','); } if (is_ajax_filter == '1' || is_search_page == '1') { toggleStockSort(); var filter_sort_order = $('select#input-sort option:selected').attr('data-value-sort'); var filter_limit = $('select#input-limit option:selected').attr('data-value-limit'); if (typeof filter_sort_order != 'undefined' && filter_sort_order != '') { var filter_sort_orderarray = filter_sort_order.split('-'); ajax_content_url += "&sort=" + filter_sort_orderarray[0] + "&order=" + filter_sort_orderarray[1]; // currentURL += "&sort=" + filter_sort_orderarray[0] + "&order=" + filter_sort_orderarray[1]; } if (typeof filter_limit != 'undefined' && filter_limit != '' && filter_limit != '0') { ajax_content_url += "&limit=" + filter_limit; // currentURL += "&limit=" + filter_limit; } if(!($('#' + containerId).hasClass('doNotFilter')) || is_search_page == 1) { ajaxLoadContent(ajax_content_url); //load content updateUrlPath(currentURL); } if (is_search_page == 1 && !isHideDisabledFilters) { loadfilter(ajax_filter_url, 'brands'); //load brands loadfilter(ajax_filter_url, 'category'); //load Category loadfilter(ajax_filter_url, 'color'); //load Color loadfilter(ajax_filter_url, 'attributes'); //load attributes } else { loadfilter(ajax_filter_url, 'full_filter'); //get fullfilter } } else { if(!($('#' + containerId).hasClass('doNotFilter'))) { location = currentURL; } } }; var loadfilter = function(ajax_filter_url, filter_exclude) { $.ajax({ url: ajax_filter_url + "&ftype=" + filter_exclude, async: true, beforeSend: function() {}, success: function(response) { processData(response.filter, filter_exclude); if (filter_exclude == 'category') { $('#filterSubCategory').remove(); $('div[data-target="#filterSubCategory"]').remove(); $('#filterCategory').after(response.filter.subcategory); } else if (filter_exclude == 'full_filter') { if (response.is_full_filter == true) { $('.ripm-product-fitler-wrapper').html(response.filter); trigerAlldefaultBindedevents(); } } $('.show-more-link a').unbind('click').on('click', function() { var txt_show_more = 'Show More'; var txt_show_less = 'Hide More'; var is_open = $(this).hasClass('less'); $('.filter-group-child-items.active').slideUp().removeClass('active'); $('.show-more-link a.less').removeClass('less').text(txt_show_more); var targer_contrainer_id = $(this).parents('.show-more-link').attr('data-target'); if (is_open) { $(targer_contrainer_id).removeClass('active').slideUp(); } else { $(this).addClass('less').text(txt_show_less); $(targer_contrainer_id).addClass('active').slideDown(); } return false; }); $('input[type=\'checkbox\']').unbind('click').on('click', function() { if ($(this).parents('#mobile-filter-tags').length) { filterData('mobile-filter-tags'); } else { filterData('column-left'); } }); }, error: function() { alert('Something wrong with server.'); } }); }; var processData = function(result, filter_include) { var filterKeyName; for (filterKeyName in result) { var filter_facet_ids = result[filterKeyName]; var fieldName = filterKeyName; if (fieldName == filter_include) { $('input[name="filter[filter[' + fieldName + ']][]"]').each(function() { var term_id = $(this).val(); if (typeof term_id != 'undefined') { var filterOptionObj = filter_facet_ids[term_id]; var curObj = $('label[for="filter[' + fieldName + ']' + term_id + '"]'); curObj.addClass('disabled'); $(this).attr('disabled', "disabled"); if (typeof filterOptionObj != 'undefined') { $(this).removeAttr('disabled'); curObj.removeClass('disabled'); curObj.text(filterOptionObj.name); } } }); } } }; var ajaxLoadContent = function(ajax_content_url, hide_loader) { var ajax_content_url = ajax_content_url.replace('https://www.dkappliances.com/', 'https://www.dkappliances.com/'); $.ajax({ url: ajax_content_url, async: true, beforeSend: function() { if (typeof hide_loader != 'undefined' && hide_loader == true) { $('.search-ajax').hide(); $('.searchoverlay').hide(); } else { $('.searchoverlay').show(); $('.search-ajax').show(); } }, success: function(response) { toggleStockSort(); $('#ajax-content-wrapper').html(response.content); if (response.is_full_filter == true) { if (response.total_items == 0) { $('#content').css('width', '100%'); } $('.ripm-product-fitler-wrapper').html(response.filter); } else if (response.filter) { $('.filter-attribute-class').remove(); $('#filterPrice').after(response.filter); } $('.filter-data-selected').empty(); $('.selected-filtes').appendTo('.filter-data-selected'); }, error: function() { $('.searchoverlay').hide(); $('.search-ajax').show(); alert('Something wrong with server.'); }, complete: function() { $('.searchoverlay').hide(); $('.search-ajax').show(); let topOffsetHeight = $('.breadcrumb').css('margin-top'); let topOffset = topOffsetHeight != '0px' ? $('header').height() : 10; $("html, body").animate({ scrollTop: $('.filter-data-selected').offset().top - topOffset }, "slow"); //LOAD CALLFORPRICE JS $('#ajaxModalCFP').remove(); $.getScript("https://d12rh965z7jvqw.cloudfront.net/javascripts/common/callforprice/callforprice_modal.min.js", function(data, textStatus, jqxhr) {}); trigerAlldefaultBindedevents(); $('.product-layoutrow .product-details .caption-grid .caption').matchHeight(); $('.ripm-featured .product-layoutrow .product-thumb .image').matchHeight(); $('.ripm-featured .product-layoutrow .product-thumb .caption').matchHeight(); $('.recently-viewed .product-layoutrow .caption').matchHeight(); $('.featured.featured-tabs .product-details .caption-grid .caption').matchHeight(); } }); }; var updateUrlPath = function(content_url) { history.pushState(null, null, content_url); }; var toggleStockSort = function() { if(hasPOSStatus) { if($('input[data-gname="filter[pos_stock]"]:checked').length > 0) { $('select#input-sort option[data-value-sort="p.quantity-ASC"]').show(); $('select#input-sort option[data-value-sort="p.quantity-DESC"]').show(); } else { $('select#input-sort option[data-value-sort="p.quantity-ASC"]').hide(); $('select#input-sort option[data-value-sort="p.quantity-DESC"]').hide(); let selected_option = $('select#input-sort option:selected').attr('data-value-sort'); let default_sort = $('select#input-sort option[data-value-sort="p.sort_order-ASC"]').attr('value'); if(selected_option == 'p.quantity-DESC' || selected_option == 'p.quantity-ASC') { $('select#input-sort').val(default_sort); // $('select#input-sort option').removeAttr('selected'); // $('select#input-sort option[data-value-sort="p.sort_order-ASC"]').attr('selected', 'selected'); } } } }; var trigerAlldefaultBindedevents = function() { cloneFilterMobile(); $('#clearFilter').removeAttr('id').addClass('clearFilter'); $('input[type=\'checkbox\']').unbind('click').on('click', function() { if(isMultiSelectFilter == '1') { $('#column-left').addClass('doNotFilter'); $('#mobile-filter-tags').addClass('doNotFilter'); } if ($(this).parents('#mobile-filter-tags').length) { filterData('mobile-filter-tags'); } else { filterData('column-left'); } }); if (is_ajax_filter == '1' || is_search_page == '1') { $('select#input-sort,select#input-limit').unbind('change').on('change', function(e) { if ($(this).parents('#mobile-filter-tags').length) { filterData('mobile-filter-tags'); } else { filterData('column-left'); } e.preventDefault(); }); } $('.selectbox select').unbind('change').on('change', function() { if(isMultiSelectFilter == '1') { $('#column-left').addClass('doNotFilter'); $('#mobile-filter-tags').addClass('doNotFilter'); } if ($(this).parents('#mobile-filter-tags').length) { filterData('mobile-filter-tags'); } else { filterData('column-left'); } }); $('#button-filter').unbind('click').on('click', function() { if(isMultiSelectFilter == '1') { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); } filterData('column-left'); }); $('#button-filter2').unbind('click').on('click', function() { if(isMultiSelectFilter == '1') { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); } filterData('mobile-filter-tags'); }); // Floating filter button for multiselect filter(Desktop) $('#button-filter3').unbind('click').on('click', function() { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); filterData('column-left'); }); // Floating filter button for multiselect filter(Mobile) $('#button-filter4').unbind('click').on('click', function() { $('#column-left').removeClass('doNotFilter'); $('#mobile-filter-tags').removeClass('doNotFilter'); filterData('mobile-filter-tags'); }); $('.show-more-link a').unbind('click').on('click', function() { var txt_show_more = 'Show More'; var txt_show_less = 'Hide More'; var is_open = $(this).hasClass('less'); $('.filter-group-child-items.active').slideUp().removeClass('active'); $('.show-more-link a.less').removeClass('less').text(txt_show_more); var targer_contrainer_id = $(this).parents('.show-more-link').attr('data-target'); if (is_open) { $(targer_contrainer_id).removeClass('active').slideUp(); } else { $(this).addClass('less').text(txt_show_less); $(targer_contrainer_id).addClass('active').slideDown(); } return false; }); var check_product_ids = []; $('[onclick^="cart.add"], [onclick^="addToCart"]').each(function(i, e) { var params = $(this).attr('onclick').match(/\d+/); check_product_ids.push(params[0]); }); if (typeof checkPrice != 'undefined') { checkPrice(check_product_ids); } $(".buttonCompareCat").unbind('click').on('click touchstart', function() { $(this).css("border", "2px solid green"); compare.add($(this).attr("prod-id")); }); //handle attributes here if (localStorage.getItem("display") == "grid") { $("#grid-view").trigger("click"); $("#grid-view").addClass("active"); } else { $("#list-view").trigger("click"); $("#list-view").addClass("active"); } /*load pagination*/ if (is_ajax_filter == '1' || is_search_page == '1') { $('.bottom-pagination .pagination a').unbind('click').on('click', function(e) { var ajax_page_url = $(this).attr('href'); e.preventDefault(); ajaxLoadContent(ajax_page_url); //load content return false; }); $('select#input-sort').removeAttr('onchange'); $('select#input-limit').removeAttr('onchange'); $(".clearFilter").unbind('click').on('click', function() { // $('select#input-sort').val(); // $('select#input-limit').val(); $(".price_min").val($('.price_min_limit').val()); $(".price_max").val($('.price_max_limit').val()); $(".amount").val("$" + $('.price_min_limit').val() + " - $" + $('.price_max_limit').val()); $('input[type=\'checkbox\']').prop('checked', false); $('select.selectbox').prop('selected', false); $('input.range-filter').val(''); isResetButtonPress = true; if ($(this).parents('#mobile-filter-tags').length) { filterData('mobile-filter-tags'); } else { filterData('column-left'); } }); } else { $(".clearFilter").unbind('click').on('click', function() { location = 'https://www.dkappliances.com/Appliances'; }); } };
Product Compare (0)
2 Additional Option
Rebate
20.8 Cu. Ft. 36" Width Built In Stainless Steel French Door Refrigerator with Platinum Interior Design
- Everyday Price : $10,299.00
Call Us for Best Price
Outside, this built-in stainless steel French door refrigerator will seamlessly integrate with your ..
20.8 Cu. Ft. 36" Width Built In Stainless Steel French Door Refrigerator with Platinum Interior Design
Outside, this built-in stainless steel French door refrigerator will seamlessly integrate with your ..
- Everyday Price : $10,299.00
Call Us for Best Price
Rebate
20.9 Cu. Ft. 36" Width Built-In Stainless Bottom Mount Refrigerator with Platinum Interior Design
- Everyday Price : $9,049.00
Call Us for Best Price
This built-in bottom-mount refrigerator is as beautiful inside as it is outside. The Preserva® Food ..
20.9 Cu. Ft. 36" Width Built-In Stainless Bottom Mount Refrigerator with Platinum Interior Design
This built-in bottom-mount refrigerator is as beautiful inside as it is outside. The Preserva® Food ..
- Everyday Price : $9,049.00
Call Us for Best Price
30'' 4-Burner Dual Fuel Freestanding Range, Commercial-Style
- Everyday Price : $5,299.00
Call Us for Best Price
This dual fuel range has commercial styling available in a variety of bold colors. The stunning loo..
30'' 4-Burner Dual Fuel Freestanding Range, Commercial-Style
This dual fuel range has commercial styling available in a variety of bold colors. The stunning loo..
- Everyday Price : $5,299.00
Call Us for Best Price
Rebate
27" Double Wall Oven with Even-Heat™ True Convection
- Everyday Price : $4,299.00
Call Us for Best Price
This 27" Double Wall Oven with Even-Heat™ True Convection provides consistent heating and even cooki..
27" Double Wall Oven with Even-Heat™ True Convection
This 27" Double Wall Oven with Even-Heat™ True Convection provides consistent heating and even cooki..
- Everyday Price : $4,299.00
Call Us for Best Price
Clearance
2 Additional Option
Rebate
Café™ ENERGY STAR® 22.1 Cu. Ft. Smart Counter-Depth French-Door Refrigerator with Hot Water Dispenser
- Everyday Price : $4,099.00
Call Us for Best Price
Café™ ENERGY STAR® 22.1 Cu. Ft. Smart Counter-Depth French-Door Refrigerator with Hot Water Dispense..
Café™ ENERGY STAR® 22.1 Cu. Ft. Smart Counter-Depth French-Door Refrigerator with Hot Water Dispenser
Café™ ENERGY STAR® 22.1 Cu. Ft. Smart Counter-Depth French-Door Refrigerator with Hot Water Dispense..
- Everyday Price : $4,099.00
Call Us for Best Price
Rebate
GE® 30" Smart Built-In Self-Clean Convection Double Wall Oven with Never Scrub Racks
- Everyday Price : $3,777.00
- Sale Price : $3,400.17
- Total Savings : $376.83
GE® 30" Smart Built-In Self-Clean Convection Double Wall Oven with Never Scrub Racks..
GE® 30" Smart Built-In Self-Clean Convection Double Wall Oven with Never Scrub Racks
GE® 30" Smart Built-In Self-Clean Convection Double Wall Oven with Never Scrub Racks..
- Everyday Price : $3,777.00
- Sale Price : $3,400.17
- Total Savings : $376.83
Clearance
2 Additional Option
Rebate
Café™ 30" Smart Slide-In, Front-Control, Gas Range with Convection Oven
- Everyday Price : $3,399.00
Call Us for Best Price
Café™ 30" Smart Slide-In, Front-Control, Gas Range with Convection Oven..
Café™ 30" Smart Slide-In, Front-Control, Gas Range with Convection Oven
Café™ 30" Smart Slide-In, Front-Control, Gas Range with Convection Oven..
- Everyday Price : $3,399.00
Call Us for Best Price
Rebate
GE® 27" Smart Built-In Convection Double Wall Oven
- Everyday Price : $3,554.00
- Sale Price : $3,199.47
- Total Savings : $354.53
GE® 27" Smart Built-In Convection Double Wall Oven..
GE® 27" Smart Built-In Convection Double Wall Oven
GE® 27" Smart Built-In Convection Double Wall Oven..
- Everyday Price : $3,554.00
- Sale Price : $3,199.47
- Total Savings : $354.53
27" Single Wall Oven with Even-Heat™ True Convection
- Everyday Price : $3,199.00
Call Us for Best Price
This 27" Single Wall Oven with Even-Heat™ True Convection provides consistent heating and even cooki..
27" Single Wall Oven with Even-Heat™ True Convection
This 27" Single Wall Oven with Even-Heat™ True Convection provides consistent heating and even cooki..
- Everyday Price : $3,199.00
Call Us for Best Price
36-Inch Wide French Door Refrigerator - 25 cu. ft.
- Everyday Price : $3,099.00
Call Us for Best Price
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
36-Inch Wide French Door Refrigerator - 25 cu. ft.
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
- Everyday Price : $3,099.00
Call Us for Best Price
36-Inch Wide French Door Refrigerator - 27 Cu. Ft.
- Everyday Price : $2,999.00
Call Us for Best Price
Maytag® stainless steel french door refrigerators are built tough with strength and storage you can ..
36-Inch Wide French Door Refrigerator - 27 Cu. Ft.
Maytag® stainless steel french door refrigerators are built tough with strength and storage you can ..
- Everyday Price : $2,999.00
Call Us for Best Price
36-Inch Wide French Door Refrigerator - 25 cu. ft.
- Everyday Price : $2,999.00
Call Us for Best Price
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
36-Inch Wide French Door Refrigerator - 25 cu. ft.
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
- Everyday Price : $2,999.00
Call Us for Best Price
36-Inch Wide French Door Refrigerator - 25 cu. ft.
- Everyday Price : $2,999.00
Call Us for Best Price
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
36-Inch Wide French Door Refrigerator - 25 cu. ft.
Get the storage you need in this refrigerator with water dispenser. An exterior refrigerated drawer ..
- Everyday Price : $2,999.00
Call Us for Best Price
1 Additional Option
Rebate
Café™ 30" Smart Slide-In, Front-Control, Gas Double-Oven Range with Convection
- Everyday Price : $3,999.00
- Sale Price : $2,998.00
- Total Savings : $1,001.00
Café™ 30" Smart Slide-In, Front-Control, Gas Double-Oven Range with Convection..
Café™ 30" Smart Slide-In, Front-Control, Gas Double-Oven Range with Convection
Café™ 30" Smart Slide-In, Front-Control, Gas Double-Oven Range with Convection..
- Everyday Price : $3,999.00
- Sale Price : $2,998.00
- Total Savings : $1,001.00
36-inch Wide 4-Door Refrigerator with Exterior Drawer - 26 cu. ft.
- Sale Price : $2,943.00
Get flexible storage with purposeful spaces for your family's favorites. This bottom freezer refrige..
36-inch Wide 4-Door Refrigerator with Exterior Drawer - 26 cu. ft.
Get flexible storage with purposeful spaces for your family's favorites. This bottom freezer refrige..
- Sale Price : $2,943.00
- 1
- 2
- 3
- 4
- 5
- >
- >|
Showing 1 to 15 of 16174 (1079 Pages)
'); }else if (value.type == 'date' || value.type == 'datetime' || value.type == 'time' || value.type == 'text' || value.type == 'textarea') { $('div #quote_details').append('- '+ value.name +': '+value.value+'
'); } else{ $('div #quote_details').append('- '+ value.name +': '+value.value+'
'); } }); } } $('div #overlay').css('display','none'); $('div #overlay').toggleClass('active'); } });$('.fancybox-skin #afq_submit').click(function(e) {var phoneFieldOptional = 'no';e.preventDefault();e.stopPropagation();if($('.fancybox-skin #afq_name').val() == '') {$('.fancybox-skin #afq_name').css({border: '#F59393 1px solid',background: '#FFF0F0'});if ($('#error-name').length < 1){ $('.fancybox-skin #afq_name').after('
Empty name field!
');}} else if(!isValidEmailAddress($('.fancybox-skin #afq_email').val()) || $('.fancybox-skin #afq_email').val() == ''){ $('.fancybox-skin #afq_name').css({border: '1px solid #ccc',background: '#fff'});$('#error-name').css("display","none");$('.fancybox-skin #afq_email').css({border: '#F59393 1px solid',background: '#FFF0F0'});if ($('#error-email').length < 1){ $('.fancybox-skin #afq_email').after('
Invalid e-mail address
');}} else if(($('.fancybox-skin #afq_phone').val().length > 0) && ($('.fancybox-skin #afq_phone').val().length != 10)) { $('.fancybox-skin #afq_email').css({border: '1px solid #ccc',background: '#fff'});$('#error-email').css("display","none");$('.fancybox-skin #afq_phone').css({border: '#F59393 1px solid',background: '#FFF0F0'});if ($('#error-phone').length < 1){ $('.fancybox-skin #afq_phone').after('
10 digits phone number is required
');}}else if(phoneFieldOptional === "no" && ($('.fancybox-skin #afq_phone').val().length == 0)){ $('.fancybox-skin #afq_email').css({border: '1px solid #ccc',background: '#fff'});$('#error-email').css("display","none");$('.fancybox-skin #afq_phone').css({border: '#F59393 1px solid',background: '#FFF0F0'});if ($('#error-phone').length < 1){ $('.fancybox-skin #afq_phone').after('
10 digits phone number is required
');} } else if(($('.fancybox-skin #afq_zipcode').val() == '') || ($('.fancybox-skin #afq_zipcode').val().length != 5)) {$('.fancybox-skin #afq_phone').css({border: '1px solid #ccc',background: '#fff'});$('#error-phone').css("display","none");$('.fancybox-skin #afq_zipcode').css({border: '#F59393 1px solid',background: '#FFF0F0'});if ($('#error-zipcode').length < 1){ $('.fancybox-skin #afq_zipcode').after('
Invalid Zipcode!
');}} else {$('.fancybox-skin #afq_zipcode').css({border: '1px solid #ccc',background: '#fff'});$('#error-zipcode').css("display","none");var afq_name = $('.fancybox-skin #afq_name').val();var afq_email = $('.fancybox-skin #afq_email').val();var afq_repeat_mail = $('.fancybox-skin #afq_repeat_email').val();var afq_phone = $('.fancybox-skin #afq_phone').val();var afq_quote_quantity = $('.fancybox-skin #quote_quantity').html();var afq_product_id = product_id;var afq_comments = $('.fancybox-skin #afq_comments').val();var afq_zipcode = $('.fancybox-skin #afq_zipcode').val();var options = new Object();var parts = new Object(); var custom_comment ='';$.each($('.fancybox-skin .selected_parts'), function(index, el) { parts[el.getAttribute('data-optionId')] = el.getAttribute('data-optionValueId'); custom_comment +=$(this).text()+"\n";}); if(custom_comment !=''){ if(afq_comments !=''){ var afq_comments = custom_comment +"Message : "+afq_comments; }else{ var afq_comments = custom_comment; } } $.each($('.fancybox-skin .selected_options'), function(index, el) {options[el.getAttribute('data-optionId')] = el.getAttribute('data-optionValueId');});$.ajax({url: 'index.php?route=extension/module/askforquote/addQuote',type: 'post',data: {name: afq_name, email: afq_email, repeat_mail: afq_repeat_mail, phone:afq_phone, product_id: afq_product_id,group_id:group_id, comments: afq_comments, options:options, quantity:afq_quote_quantity, zipcode:afq_zipcode},dataType: 'json',beforeSend: function() {$(".fancybox-skin #afq_submit").hide(); $(".afq_loader").show(); },success: function(json) {$(".afq_loader").hide();$(".fancybox-skin #afq_submit").show();if(json=='success') {var url = "/index.php?route=extension/module/askforquote/success"; $(location).attr('href',url);} else if (json=='error') {$('.fancybox-skin #afq_zipcode').css({border: '#F59393 1px solid',background: '#FFF0F0'});$('.fancybox-skin #afq_zipcode').after('
We are sorry, but we do not deliver to your area. Please contact our store, and we can facilitate a pick up.
');} else {$('.fancybox-skin #afq_zipcode').css({border: '1px solid #ccc',background: '#fff'});$('#error-zipcode').css("display","none");}}});}});}});}var showAFQPopup = function (width,height,product_id,group_id) {$.ajax({url: 'index.php?route=extension/module/askforquote/checkRequiredOptions',type: 'post',data: $('#product input[type=\'text\'], #product input[type=\'hidden\'], #product input[type=\'radio\']:checked, #product input[type=\'checkbox\']:checked, #product select, #product textarea'),dataType: 'json',success: function(json) {if (!json['error']){openPopup(width, height, product_id,group_id);} else {if (json['error']) {$('.alert, .text-danger').remove();$('.form-group').removeClass('has-error');if (json['error']['option']) {for (i in json['error']['option']) {var element = $('#input-option' + i.replace('_', '-'));if (element.parent().hasClass('input-group')) {element.parent().after('
' + json['error']['option'][i] + '
');} else {element.after('
' + json['error']['option'][i] + '
');}}}if (json['error']['recurring']) {$('select[name=\'recurring_id\']').after('
' + json['error']['recurring'] + '
');}// Highlight any found errors$('.text-danger').parent().addClass('has-error');}}}});};