Buy Pillow Covers Online | Pillow Cases Online at Pothys (2024)

' + '

' + imagesection + '

' + '

QUICKVIEW

' + color_variants_dom + '

' + '

' + limit_subcategory + '...' + '

' + '

' + (prod_name.length > 140 ? prod_name.substring(0, 140) + '...' : prod_name) + '

' + price + '

' + '

' + '

' + '

' + '' + '' + '' + '' + '

' + '

' + '

' + '

' + ''; } if(ga_items.length>0){ gtag("event", "view_item_list", { item_list_id: item_list_name.replace(/ /g, "_").toLowerCase(), item_list_name: item_list_name, items: ga_items }); } if (ctn == '') { try { webengage.track('Sub Category Viewed', { 'event': 'subcategoryViewed', 'Subcategory Id': w_subcategoryid, 'Category Name': w_category, 'Subcategory Name': w_subcategory, //'Subcategory Image' : scimage, 'Item Count': result.found, 'Ua': window.location.href }); } catch (error) { console.log(error); } } else { console.log('check here'); try { webengage.track('Category Viewed', { 'event': 'categoryViewed', 'Category Id': w_categoryid, 'Category Name': w_category, // 'Category Image':imagepath1, 'Item Count': result.found, 'Ua': window.location.href }); } catch (error) { console.log(error); } } if (total_no_of_pages <= 0) { total_no_of_pages = 1; } for (var i = 1; i <= total_no_of_pages; i++) { var style = ""; if (i == result.page) { style = "style='color:white;background:grey'"; } objJson.push('' + i + ''); } console.log(objJson); current_page = pageno; $("#pothys_loader1").html(productsection); $("#hidPagination").val(result.page); var mypage1 = Math.ceil(current_page / 5); $("#total_no_of_products_back").val(mypage1); changePage(mypage1); addwishlist(); var gridval = localStorage.getItem("gridval"); if (gridval == "double") { grid2(); } else { grid1(); } setTimeout(function() { currencyconverter(); }, 1000); $("#is_previous_call").val("completed"); if (currency_sym !== '₹') { if(initial ===0) { setTimeout(() => { $(".sidefilter_loader").hide(); }, 3000); } else { setTimeout(() => { $(".sidefilter_loader").hide(); }, 1000); } } else { setTimeout(() => { $(".sidefilter_loader").hide(); }, 1000); } } }); } document.addEventListener('DOMContentLoaded', (event) => { currencyconverter(); }); function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() + string.slice(1); } function moveColorToEnd(colorValue, array) { const index = array.findIndex(obj => obj.colorvalue === colorValue); if (index !== -1) { const color = array.splice(index, 1)[0]; array.push(color); } } function reloadFilters(reloadFilters_val, check_box, value, id) { const url = new URL(window.location.href); var prodlist = url.searchParams.get("prodlist"); var brands_url=false; var my_brand_list = url.searchParams.get("bndfl"); if(brands_url===true) { if(reloadFilters_val.includes("brand_name")===false) { if (my_brand_list !== "" && my_brand_list !== null) { reloadFilters_val += " brand_name:=[" + my_brand_list + "] && "; } } } console.log('relodf:'+reloadFilters_val); console.log('check_box:'+JSON.stringify(check_box)); var ctn = url.searchParams.get("ctn"); var filter_category = url.searchParams.get("ctf"); filter_category = decodeURIComponent(filter_category); if (filter_category != '' && filter_category != null && filter_category != "null" ) { filter_category = decodeURIComponent(filter_category); } else { filter_category = 'NO_DATA'; } if (ctn !== "" && ctn !== null) { reloadFilters_val += " category:=[" + ctn + "] && "; } console.log(reloadFilters_val); // debugger; var fstrid_special='ST01'; var search_wd1 = url.searchParams.get("searchwd"); var search_wd1_send=""; if (search_wd1 !== "" && search_wd1 !== null) { search_wd1_send=search_wd1; } $.ajax({ type: "GET", url: "https://www.pothys.com/test/include/test_typesense.php", data: { device: 'web', type: 'three', data: encodeURIComponent(reloadFilters_val), pageno: "1", id: id, filter_category: "NO_DATA", value: encodeURIComponent(value), prodlist: prodlist, fstrid:fstrid_special, searchwd:search_wd1_send }, crossDomain: true, // cache:false, success: function(response) { $("#is_previous_call").val("completed"); initial++; var filters_res = JSON.parse(response); //var decode_array = Object.values(filters_res); var min_one_filter = 0; var output_res = ``; var get_all_filter = $("#allFiltersTypesense").val(); get_zero_filter = []; var overall_count = 0; for (var key in filters_res) { get_zero_filter.push(key); my_filter = ""; var filter_name = capitalizeFirstLetter(key); if (key === "ALL_FILTERS") { // debugger; //$("#allFiltersTypesense").val(filters_res['ALL_FILTERS']['INSTRING']); const originalUrl = window.location.href; const url = new URL(originalUrl); url.search = ''; var newParamsRaw = filters_res['ALL_FILTERS']['url_update']; // Append the new parameters url.search = '?' + newParamsRaw; history.replaceState({}, document.title, url.toString()); continue; } var dynamic_min_value = 0; var dynamic_max_value = 0; if (key == 'Price') { console.log("currency is"); console.log(currency_rate); dynamic_min_value = Math.round(parseFloat(filters_res["Price"]['Min']) * currency_rate); dynamic_max_value = Math.round(parseFloat(filters_res["Price"]['Max']) * currency_rate); if (value === "Price") { localStorage.setItem("min_price_set", parseFloat(dynamic_min_value)); localStorage.setItem("max_price_set", parseFloat(dynamic_max_value)); } output_res = `

Price

clear

+

`; } else { //debugger; var hide_subcount = filters_res[key]["OVERALL_COUNT"]; if (hide_subcount === 0) { $("#dynamic_ui_filter_" + key).css('display', "none"); console.log("#dynamic_ui_filter_" + key); continue; } else { $("#dynamic_ui_filter_" + key).css('display', "block"); } // debugger; var my_filter_name = filter_name.toLowerCase(); if (my_filter_name == 'filter_category') { my_filter_name = "Category"; } else if (my_filter_name == 'size_value') { my_filter_name = "Size"; } else if (my_filter_name == 'brand_name') { my_filter_name = "Brand"; } else { my_filter_name = my_filter_name.replace(/_/g, ''); } my_filter_name = capitalizeFirstLetter(my_filter_name) output_res = `

${my_filter_name}

clear

+

`; } var mine = 0; $(".filt-prd-left_" + key).each(function(index) { mine = mine + parseInt($(this).text()); }); // debugger; if (value !== key) { $("#dynamic_ui_filter_" + key).html(output_res); } else if (min_one_filter === 0) { if (value !== "Price") { $("#dynamic_ui_filter_" + key).html(output_res); //appendToURLParameter(key, ovarall_param_update); } } if(key==="Price") { debugger; var min_eval_val=$("#minPrice").val(); if(min_eval_val==="" ) { var min_val_set=$("#minPrice").attr("min"); var max_val_set=$("#minPrice").attr("max"); $("#minPrice").val(min_val_set); $("#maxPrice").val(max_val_set); } else if(currency_sym != '₹') { if(value!='Price') { debugger; var min_val_set=$("#minPrice").attr("min"); var max_val_set=$("#minPrice").attr("max"); // min_val_set = Math.round(min_val_set * currency_rate); // max_val_set = Math.round(max_val_set * currency_rate); $("#minPrice").val(min_val_set); $("#maxPrice").val(max_val_set); } } firstr = 1; } checkSelectedFilter(key); } const outputArray = get_all_filter.split(','); for (const item of outputArray) { const checkedCheckboxes = document.querySelectorAll('.checklist_' + item + ':checked'); if (checkedCheckboxes.length === 0) { // var deleted_param=filters_withparam[item]; // const urlParams = new URLSearchParams(window.location.search); // if (urlParams.has(deleted_param)) // { // // Remove the specified parameter // urlParams.delete(deleted_param); // debugger; // const searchParams = urlParams.toString(); // const newUrl = searchParams ? `${window.location.pathname}?${searchParams}` : window.location.pathname; // // Use replaceState to update the URL without adding a new entry to the browser's history // history.replaceState(null, '', newUrl); // // Verify the updated URL // console.log('Updated URL:', newUrl); // // Verify the updated URL // console.log('Updated URL:', newUrl); // } } if (get_zero_filter.includes(item)) { } else { $("#dynamic_ui_filter_" + item).html(''); } } if ($("#priceSlider").length) { const $slider1 = document.getElementById('priceSlider'); $slider1.addEventListener('onMouseUp', (evt) => { typesense_filter("Price"); }); const priceSliderTouchElm = document.getElementById('priceSlider'); priceSliderTouchElm.addEventListener('touchend', ()=>{ console.log("touchend"); typesense_filter("Price"); }); } } }); } function resetMainFilterCount(id, data) { var url = 'https://www.pothys.com/test/include/'; $.ajax({ type: "GET", url: url + "filter_web_typesense.php", data: { id: id, catfv: "No_data", data: data }, crossDomain: true, cache: false, success: function(response) { if (response != '') { $("#myfilter_div").html(response); } } }); } function prevPage() { var mypage121 = $("#total_no_of_products_back").val(); mypage121--; $("#total_no_of_products_back").val(mypage121); changePage(mypage121); } function nextPage() { var mypage121 = $("#total_no_of_products_back").val(); if (current_page < numPages()) { mypage121++; $("#total_no_of_products_back").val(mypage121); changePage(mypage121); } } function changePage(page) { $("#paginationdiv").css("display", "block"); var btn_next = document.getElementById("btn_next"); var btn_prev = document.getElementById("btn_prev"); var listing_table = document.getElementById("countList"); var my_tot_count = $("#total_no_of_products_hid").val(); var total_no_of_products_div_by = $("#total_no_of_products_div_by").val(); // Validate page // if(page>1) // { // total_no_of_products_div_by=32; // } // if(parseInt(my_tot_count)>96) // { // my_tot_count=my_tot_count-64; // } var exec_break = false; if (page == 1 && my_tot_count < 96) { exec_break = true; } if (page < 1) page = 1; console.log(Math.ceil(my_tot_count / total_no_of_products_div_by)); var tot = Math.ceil(my_tot_count / total_no_of_products_div_by); var sub_tot = tot; tot = tot / 5; listing_table.innerHTML = ""; console.log(my_tot_count / page); var arr_count = objJson.length; var temp_i = 0; for (var i = (page - 1) * records_per_page; i < (page * records_per_page); i++) { if (i == sub_tot) { break; } if (objJson[i] != undefined) { listing_table.innerHTML += objJson[i]; } temp_i = temp_i + 1; if (i != 1 && exec_break == true && arr_count <= temp_i) { break; } } $(".checkcount_pagi").css("color", ""); $(".checkcount_pagi").css("background", ""); var id = $("#current_selection_page").val(); $("#" + id).css("color", "white"); $("#" + id).css("background", "grey"); if (page == 1) { $("#btn_prev").css("display", "none"); btn_prev.style.visibility = "hidden"; } else { $("#btn_prev").css("display", "block"); btn_prev.style.visibility = "visible"; } if (Math.ceil(tot) < 1) { tot = 1; } if (page >= tot) { $("#btn_next").css("display", "none"); btn_next.style.visibility = "hidden"; } else { $("#btn_next").css("display", "block"); btn_next.style.visibility = "visible"; } } function numPages() { var myval = $("#total_no_of_products_hid").val(); var mydivby = $("#total_no_of_products_div_by").val(); return Math.ceil(myval / mydivby); } function clearFilterTypeSense(id) { // delete price state from local storage // if ($('#priceSlider').length > 0) // { // priceStateDelete(); // } // // //delete filter state from local storage // // filterStateDelete(); var id1 = id; var clsName = id1.replace("clear_filter_", ''); console.log(clsName); $(".checklist_" + clsName).prop('checked', false); var mycurrent_page = window.location.href; var url = new URL(mycurrent_page); var params = new URLSearchParams(url.search); params.delete(clsName); console.log(params.toString()); if (params.toString() == "") { location.reload(); } else { console.log("https://www.pothys.com/productlist3?" + params.toString()); substring = "pothys-brands.html"; if (mycurrent_page.includes(substring) === true) { var urlSearchParams = new URLSearchParams(window.location.search); var bndflid_from_param = urlSearchParams.get('bndflid'); bdnfl_fil1 = urlSearchParams.get('bndfl'); data_pass_fil1 = urlSearchParams.get('data_pass'); if (bdnfl_fil1 === "" || bdnfl_fil1 === null) { } else { params = "bndfl=" + bdnfl_fil1; } if (bndflid_from_param === "" || bndflid_from_param === null) { } else { brand_param = "bndfl=" + bndflid_from_param + "&"; } if (params.endsWith("&")) { if (data_pass_fil1 !== "") { params = params + "data_pass=" + data_pass_fil1; } } else { if (data_pass_fil1 !== "") { params = params + "&data_pass=" + data_pass_fil1; } } window.location.href = "https://www.pothys.com/pothys-brands.html?" + params.toString(); } else { window.location.href = "https://www.pothys.com/productlist3?" + params.toString(); } } } function goToPage(i) { $("#hidPageSelect").val(i); $("#current_selection_page").val("current_page_" + i); typesense_filter("NOT"); window.scrollTo({ top: 0, }) } var current_page = 1; var records_per_page = 5; var objJson = []; total_no_of_products = 0; if ($("#priceSlider").length) { const $slider1 = document.getElementById('priceSlider'); $slider1.addEventListener('onMouseUp', (evt) => { typesense_filter("Price"); }); const priceSliderTouchElm = document.getElementById('priceSlider'); priceSliderTouchElm.addEventListener('touchend', ()=>{ console.log("touchend"); typesense_filter("Price"); }); } function priceRangeFilter2() { console.log('prg'); var priceSlider = document.getElementById('priceSlider'); var minPrice = document.getElementById('minPrice'); var maxPrice = document.getElementById('maxPrice'); priceSlider.addEventListener('change', function() { console.log('prg1'); var minSlider = priceSlider.value1; var maxSlider = priceSlider.value2; minPrice.value = minSlider; maxPrice.value = maxSlider; var priceErr = document.getElementById('pricerange_err'); var filter_applybtn = document.querySelector('.filter_apply'); priceErr.innerHTML = ''; priceErr.style.display = "none"; }); minPrice.addEventListener('input', function() { // Update the slider's minimum value priceSlider.value1 = this.value; // You might need to call a method to update the slider's visual display //priceSlider.update(); // This is just an example. Replace 'update' with the actual method name. }); maxPrice.addEventListener('input', function() { // Update the slider's maximum value priceSlider.value2 = this.value; // You might need to call a method to update the slider's visual display //priceSlider.update(); // This is just an example. Replace 'update' with the actual method name. }); }; function isValidJson(jsonString) { try { JSON.parse(jsonString); return true; } catch (error) { return false; }} function validateInputbefore(id) { var input = document.querySelector('#' + id); var result = "false"; console.log(currency_rate); if (input.min && input.max && input.value) { var min = parseInt(input.min); var max = parseInt(input.max); var value = parseInt(input.value); var temp_min_value=value; min = Math.round(min / currency_rate); max = Math.round(max / currency_rate); value = Math.round(value / currency_rate);; var priceErr = document.getElementById('pricerange_err'); var filter_applybtn = document.querySelector('.filter_apply'); var minprice = parseFloat($("#minPrice").val()); var maxprice = parseFloat($("#maxPrice").val()); var minPrice_min_value=$("#minPrice").attr("min"); var maxPrice_min_value=$("#minPrice").attr("max"); if (minprice > maxprice) { var dynamic_min_value = Math.round(parseFloat(min * currency_rate)); var dynamic_max_value = Math.round(parseFloat(max * currency_rate)); var errMessage = "Please enter a value between " + currency_sym + dynamic_min_value + " and " + currency_sym + dynamic_max_value; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; } else if (temp_min_value < minPrice_min_value || temp_min_value > maxPrice_min_value) { var dynamic_min_value = Math.round(parseFloat(min * currency_rate)); var dynamic_max_value = Math.round(parseFloat(max * currency_rate)); var errMessage = "Please enter a value between " + currency_sym + minPrice_min_value + " and " + currency_sym + maxPrice_min_value; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; // filter_applybtn.disabled = true; } else { result = "true"; } } return result; } function validateInput2(input) { if (input.min && input.max && input.value) { var min = parseInt(input.min); var max = parseInt(input.max); var value = parseInt(input.value); var temp_min_value=value; min = Math.round(min / currency_rate); max = Math.round(max / currency_rate); value = Math.round(value / currency_rate);; var priceErr = document.getElementById('pricerange_err'); var filter_applybtn = document.querySelector('.filter_apply'); var minprice = parseFloat($("#minPrice").val()); var maxprice = parseFloat($("#maxPrice").val()); var minPrice_min_value=$("#minPrice").attr("min"); var maxPrice_min_value=$("#minPrice").attr("max"); if (minprice > maxprice) { var dynamic_min_value = Math.round(parseFloat(min * currency_rate)); var dynamic_max_value = Math.round(parseFloat(max * currency_rate)); var errMessage = "Please enter a value between " + currency_sym + dynamic_min_value + " and " + currency_sym + dynamic_max_value; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; } else if (temp_min_value < minPrice_min_value || temp_min_value > maxPrice_min_value) { var dynamic_min_value = Math.round(parseFloat(min * currency_rate)); var dynamic_max_value = Math.round(parseFloat(max * currency_rate)); var errMessage = "Please enter a value between " + currency_sym + minPrice_min_value + " and " + currency_sym + maxPrice_min_value; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; // filter_applybtn.disabled = true; priceRangeFilter2(); typesense_filter("Price"); } else { priceErr.innerHTML = ''; priceErr.style.display = "none"; // filter_applybtn.disabled = false; typesense_filter("Price"); } } else { var priceErr = document.getElementById('pricerange_err'); var filter_applybtn = document.querySelector('.filter_apply'); var errMessage = "Please enter a value "; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; // filter_applybtn.disabled = true; fprice = 1 } } function appendToURLParameter(key, value, status) { const url = new URL(window.location.href); key = filters_withparam[key]; const existingValue = url.searchParams.get(key); value = encodeURIComponent(value); if (existingValue !== null) { // Split the existing values by ',' and convert them into an array const existingValuesArray = existingValue.split(','); // Check if the specific value exists in the array const indexToRemove = existingValuesArray.indexOf(value); if (indexToRemove !== -1) { // If the specific value exists, delete it from the array existingValuesArray.splice(indexToRemove, 1); // Join the modified array back into a string with ',' as the separator const updatedValue = existingValuesArray.join(','); if (updatedValue !== '') { // If there are still values left, set the updated value url.searchParams.set(key, updatedValue); } else { // If there are no values left, delete the parameter url.searchParams.delete(key); } } } if (value !== '') { // Append the new value if it's not empty and status is not 0 url.searchParams.delete(key); if (value !== existingValue) { url.searchParams.append(key, value); } } // Replace the current state with the modified URL window.history.pushState({}, '', url.toString()); } var run_from_url = 0; var currency_change_initial = 0; function filterorderbymob(id) { $('#orderby').val(id).trigger('change'); $(".modal-backdrop").removeClass("in"); $("#myModal").css("display", "none"); $(".modal-backdrop").css("display", "none"); $(".sort-option").removeClass("sortactive") if (id == "lowest") { $("#orderby1").addClass("sortactive"); } else if (id == "highest") { $("#orderby2").addClass("sortactive"); } else if (id == "newest") { $("#orderby3").addClass("sortactive"); } else if (id == "oldest") { $("#orderby4").addClass("sortactive"); } } /*------------ filter state reload coded begins-------------*/ function filterStateRestore() { var checkboxes = document.querySelectorAll('.filter_list input[type=checkbox]'); console.log('allcheckboxes' + checkboxes); // Use forEach to iterate over the checkboxes checkboxes.forEach(function(checkbox) { // Set the checked state of this checkbox // according to the saved value checkbox.checked = localStorage.getItem(checkbox.id) === "true"; // Add an event listener for when this checkbox changes checkbox.addEventListener('change', function(event) { console.log(event.target.id + ' checked'); event.target.classList.add("fltr-active"); // Save the new checked state of this checkbox localStorage.setItem(event.target.id, event.target.checked); }); }); }; function priceStateRestore() { // price range slider restore var priceSlider = document.getElementById('priceSlider'); var pfil = ''; var min_loc_price = 0, max_loc_price = 0; if (pfil != '') { var nums = pfil.split('..'); var minRange = parseFloat(nums[0]); var maxRange = parseFloat(nums[1]); min_loc_price = Math.round(minRange * currency_rate); max_loc_price = Math.round(maxRange * currency_rate); } else { var minRange = document.getElementById('minPrice').value; var maxRange = document.getElementById('maxPrice').value; min_loc_price = minRange; max_loc_price = maxRange; } console.log('min_loc_price' + min_loc_price + 'max_loc_price' + max_loc_price); priceSlider.value1 = min_loc_price; priceSlider.value2 = max_loc_price; var minPrice = document.getElementById('minPrice'); var maxPrice = document.getElementById('maxPrice'); minPrice.value = min_loc_price; maxPrice.value = max_loc_price; }; function pricefiltercurrency() { var minPrice = document.getElementById('minPrice').value; var maxPrice = document.getElementById('maxPrice').value; var min_amt = parseFloat(Math.round(minPrice * currency_rate)); var max_amt = parseFloat(Math.round(maxPrice * currency_rate)); $('#priceLabelMin').html(currency_sym + min_amt); $('#priceLabelMax').html(currency_sym + max_amt); $('#minPrice').val(min_amt); $('#maxPrice').val(max_amt); $('#minPrice').attr('min', min_amt); $('#minPrice').attr('max', max_amt); $('#maxPrice').attr('min', min_amt); $('#maxPrice').attr('max', max_amt); var priceSlider = document.getElementById('priceSlider'); priceSlider.setAttribute('min', min_amt); priceSlider.setAttribute('max', max_amt); priceSlider.setAttribute('value1', min_amt); priceSlider.setAttribute('value2', max_amt); setTimeout(function() { priceStateRestore(); }, 200) } /*------------ filter state reload coded ends-------------*/ /*------------ filter state delete coded begins-------------*/ function filterStateDelete() { var checkboxesdelete = document.querySelectorAll('.filter_list input[type=checkbox]'); // Use forEach to iterate over the checkboxes checkboxesdelete.forEach(function(checkbox) { // Uncheck this checkbox checkbox.checked = false; // Remove the saved state of this checkbox from localStorage localStorage.removeItem(checkbox.id); }); console.log("filter cleared"); }; /*------------ filter state delete coded ends-------------*/ function priceStateDelete() { localStorage.removeItem("minPrice"); localStorage.removeItem("maxPrice"); var priceSlider = document.getElementById('priceSlider'); var minRange = priceSlider.min; var maxRange = priceSlider.max; console.log("previous price range" + minRange + "-" + maxRange); document.getElementById('minPrice').value = minRange; document.getElementById('maxPrice').value = maxRange; priceSlider.value1 = minRange; priceSlider.value2 = maxRange; }; /*------------ price-filter code begins----------------*/ function priceRangeFilter() { var priceSlider = document.getElementById('priceSlider'); var minPrice = document.getElementById('minPrice'); var maxPrice = document.getElementById('maxPrice'); priceSlider.addEventListener('change', function() { var minSlider = priceSlider.value1; var maxSlider = priceSlider.value2; minPrice.value = minSlider; maxPrice.value = maxSlider; }); minPrice.addEventListener('input', function() { // Update the slider's minimum value priceSlider.value1 = this.value; // You might need to call a method to update the slider's visual display //priceSlider.update(); // This is just an example. Replace 'update' with the actual method name. }); maxPrice.addEventListener('input', function() { // Update the slider's maximum value priceSlider.value2 = this.value; // You might need to call a method to update the slider's visual display //priceSlider.update(); // This is just an example. Replace 'update' with the actual method name. }); }; /*------------ price-filter code ends----------------*/ //price input validation function validateInput(input) { if (input.min && input.max && input.value) { var min = parseInt(input.min); var max = parseInt(input.max); var value = parseInt(input.value); var priceErr = document.getElementById('pricerange_err'); var filter_applybtn = document.querySelector('.filter_apply'); console.log('min' + min + ' max' + max + ' value' + value); if (value < min || value > max) { var errMessage = "Please enter a value between " + currency_sym + min + " and " + currency_sym + max; priceErr.style.display = "block"; priceErr.innerHTML = errMessage; filter_applybtn.disabled = true; } else { priceErr.innerHTML = ''; priceErr.style.display = "none"; filter_applybtn.disabled = false; } priceRangeFilter(); } else { console.log('One or more input values are empty or undefined'); } } // quickview funcianolity start function quickViewOpen(prop) { // over all scroll hide const htmlElm = document.querySelector('html'); htmlElm.classList.add('qv-popup'); var productDestructure = quickViewProductArray[prop].document var sizeValue = productDestructure.size_value; var productid = productDestructure.productid; // quickview left content ajax call start const backendurl = 'https://www.pothys.com/include/'; $.ajax({ type: "POST", url: backendurl + "get_product_details.php", crossDomain: true, data: { pid: productid, type: 'getsliderimg' }, cache: true, success: function(response) { var showimages = []; var jsondata = JSON.parse(response); console.log(jsondata); const qvSmallImgContainer = document.querySelector(".qv-sm-img-container"); const qvLargeImgContainer = document.querySelector(".qv-lg-img-container"); var smallImg = ""; var largeImg = ""; for (let i = 0; i < jsondata.length; i++) { var imagepath1 = jsondata[i].imagepath1; var imagepath2 = jsondata[i].imagepath2; var imagepath3 = jsondata[i].imagepath3; var imagepath4 = jsondata[i].imagepath4; var imagepath5 = jsondata[i].imagepath5; var imagepath6 = jsondata[i].imagepath6; if (imagepath1.length != 0) { showimages.push(imagepath1); } if (imagepath2.length != 0) { showimages.push(imagepath2); } if (imagepath3.length != 0) { showimages.push(imagepath3); } if (imagepath4.length != 0) { showimages.push(imagepath4); } if (imagepath5.length != 0) { showimages.push(imagepath5); } if (imagepath6.length != 0) { showimages.push(imagepath6); } } for (let i = 0; i < showimages.length; i++) { if (i == 0) { smallImg += `

Buy Pillow Covers Online | Pillow Cases Online at Pothys (1)

`; } else { smallImg += `

Buy Pillow Covers Online | Pillow Cases Online at Pothys (2)

`; } } for (let i = 0; i < showimages.length; i++) { largeImg += `

Buy Pillow Covers Online | Pillow Cases Online at Pothys (3)

`; } qvSmallImgContainer.innerHTML = smallImg; qvLargeImgContainer.innerHTML = largeImg; // slide immage funtions start var imgID = 0; const selectImage = document.querySelectorAll(".qv-sm-img-container .qv-sm-img"); console.log(selectImage); console.log("testt"); selectImage.forEach((img) => { img.addEventListener("click", () => { const selectAllImage = document.querySelectorAll(".qv-sm-img-container .qv-sm-img"); selectAllImage.forEach((item) => { item.classList.remove('active'); }) img.classList.add('active'); imgID = img.dataset.id; changeQuickviewimg(); }) }); function changeQuickviewimg() { const mainImg = document.querySelector(".qv-lg-img-container"); const imgClientHeight = document.querySelector('.qv-lg-img').clientHeight; var height = (imgClientHeight * (imgID - 1)); mainImg.style.transform = `translatey(-${height}px)`; }; // slide immage funtions end } }) // quickview left content ajax call end // quickview rigth content ajax call start var instockMeter; const linkurl = 'https://www.pothys.com/test/include/'; $.ajax({ type: "POST", url: linkurl + "get_product_details_test.php", crossDomain: true, data: { pid: productid, type: 'get_web' }, cache: true, success: function(response) { console.log(response); var jsondata = JSON.parse(response); for (let i = 0; i < jsondata.length; i++) { var instock_meter = jsondata[i].instock_meter var sizechart = JSON.parse(jsondata[i].sizechart); var seourl = jsondata[i].seourl; var subcategory =jsondata[i].subcategory; var productname =jsondata[i].productname; var sprice = parseInt(jsondata[i].sprice); var mrp =jsondata[i].mrp; var discount =jsondata[i].discount; var cdiscpercent =jsondata[i].cdiscpercent; var minunit =jsondata[i].minunit; var colorchart = JSON.parse(jsondata[i].colorchart); var spriceformat = sprice.toString().replace(/(\.[0-9]*?)0+/g, ""); var mrpformat = mrp.toString().replace(/(\.[0-9]*?)0+/g, ""); if (cdiscpercent != 0){ sprice= sprice - ((sprice * parseInt(cdiscpercent)) / 100); } if (instock_meter != 0) { instockMeter = `

${instock_meter}

` } else { instockMeter = "" } var mrpstyle; if(sprice == mrp){ mrpstyle = "display:none"; }else{ mrpstyle = "display:block;"; } // snapmit start var snapmit; var price_mob; var newprice = ""; if ((discount == 0) && (cdiscpercent == 0)) { if (minunit == "1") { snapmit = `

`; price_mob = `

`; } else { snapmit = `

`; price_mob = `

`; } } else { totaldiscount = 0; if (cdiscpercent != 0) { totaldiscount = parseInt(cdiscpercent); } if (discount != 0) { totaldiscount = totaldiscount + discount; } newprice = mrp; if (totaldiscount < 100) { newprice = mrp - ((mrp * totaldiscount) / 100); } if (minunit == "1") { snapmit = `

`; price_mob = `

`; } else { snapmit = `(Price/Metre)`; price_mob = ``; } } // snapmit end // size chart start var sizeTitle; var sizeContent = ""; var sizeDisable = "size-disbaled"; var size_prevent_pointerEvent ="prevent-pointerEvent"; if (sizeValue != "") { sizeTitle = `

Select Size

` for (let i = 0; i < sizechart.length; i++) { if(sizechart[i].active == 'true'){ size_prevent_pointerEvent=""; sizeDisable=""; }else if(sizechart[i].active == 'false'){ sizeDisable="size-disbaled"; size_prevent_pointerEvent="prevent-pointerEvent"; } if (sizeValue == sizechart[i].sizevalue) { sizeContent += `${sizechart[i].sizevalue}`; } else { sizeContent += `${sizechart[i].sizevalue}`; } } } else { sizeTitle = "" sizeContent = '' } // size chart end // color varients start var qvColorVarientDomContainer = ''; var qvColorVarientDom = ''; var colorDisable ="color-disbaled"; var prevent_pointerEvent ="prevent-pointerEvent"; var colorActivebox ="active-box"; for(let i=0;i
` }; if(colorchart.length == 0){ qvColorVarientDomContainer ="" }else{ qvColorVarientDomContainer =`

${qvColorVarientDom}

` } // color varients end var qvRightContent = `

${subcategory}

${productname}

₹${sprice}

₹${mrp}

${snapmit}

Product details

Product code

WCS195

Product code

WCS195

Product code

WCS195

Product code

WCS195

Product code

Kancheepuram, Tamilnadu

Product code

WCS195

${instockMeter} ${qvColorVarientDomContainer} ${sizeTitle}

${sizeContent}

QUANTITY

view product
` getsnapmintemi(); currencyconverter(); document.querySelector("#qv-right").innerHTML = qvRightContent; addwishlist(); const quickviewContainer = document.querySelector('.quickview-container'); quickviewContainer.classList.remove("active"); } } }) // quickview rigth content ajax call end } function quickViewClose() { const quickviewContainer = document.querySelector('.quickview-container'); quickviewContainer.classList.add("active"); const selectAllImage = document.querySelectorAll(".qv-sm-img-container .qv-sm-img"); selectAllImage.forEach((item) => { item.classList.remove('active'); }) const mainImg = document.querySelector(".qv-lg-img-container"); mainImg.style.removeProperty('transform'); const htmlElm = document.querySelector('html'); htmlElm.classList.remove('qv-popup'); } function getsnapmintemi() { (function() { var snapmint = document.createElement('script'); snapmint.type = 'text/javascript'; snapmint.async = true; snapmint.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'assets.snapmint.com/assets/merchant/1568/snapmint_emi.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(snapmint, s); })(); } // quickview funcianolity end

Buy Pillow Covers Online | Pillow Cases Online at Pothys (2024)
Top Articles
Latest Posts
Article information

Author: Pres. Lawanda Wiegand

Last Updated:

Views: 5814

Rating: 4 / 5 (71 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Pres. Lawanda Wiegand

Birthday: 1993-01-10

Address: Suite 391 6963 Ullrich Shore, Bellefort, WI 01350-7893

Phone: +6806610432415

Job: Dynamic Manufacturing Assistant

Hobby: amateur radio, Taekwondo, Wood carving, Parkour, Skateboarding, Running, Rafting

Introduction: My name is Pres. Lawanda Wiegand, I am a inquisitive, helpful, glamorous, cheerful, open, clever, innocent person who loves writing and wants to share my knowledge and understanding with you.