[]
Online Electronics Store | Buy Electronics Online – Ubuy India -1 || ua.indexOf(“Trident/”) > -1; return is_ie; } var is_arabic_store = ”; var isCartPage = ‘0’; var cloud_url = ‘https://d3ulwu8fab47va.cloudfront.net/skin/frontend/default/ubuycom-v1/’; ]]> “; total_suggestion = res[‘suggestions’].length; prefix = res[‘prefix’]; for (i = 0; i 0){ prefix_before=item_str_parts[0]; } if(typeof item_str_parts[1] !== ‘undefined’){ data+=”

  • “+prefix_before+””+prefix+””+item_str_parts[1]+””; } else { data += “
  • ” + item_value + “”; } } } data += “”; if (jQuery(‘.’ + suggestion_list).length == 0) { jQuery(‘#search-form-sm’).append(“”); } if (total_suggestion > 0 && prefix.length > 0) { jQuery(‘.’ + suggestion_list).show(); jQuery(‘.’ + suggestion_list).html(data); } else { jQuery(‘.’ + suggestion_list).html(“”); jQuery(‘.’ + suggestion_list).hide(); } } function autocomplete(e) { str = $(“#” + searchelid).val().trim(); data = []; if (pause_search_onkeys.indexOf(e.keyCode) !== -1 || str.length == 0) { return; } if (str.length > 1 && search_key != str) { search_key = str; url = “https://completion.amazon.com/api/2017/suggestions”; jQuery.ajax({ url: url, type: “get”, data: {“prefix”: search_key, “limit”: 10, “suggestion-type”: “KEYWORD”, “page-type”: “Gateway”, “alias”: “aps”, “site-variant”: “desktop”, “version”: “3”, “lop”: “en_US”, “session-id”: “142-6771240-2036552”, “request-id”: “0Z9ABVE2NT3DJVXM98TE”, “mid”: “ATVPDKIKX0DER”, “plain-mid”: “1”, “client-info”: “amazon-search-ui” }, beforeSend: function () { /* jQuery(“.suggestion-box”).remove();*/ }, success: setSuggestionContent }); } else { jQuery(‘.’ + suggestion_list).show(); } $(‘.main-header’).addClass(“suggestion-layer”); $(‘body’).addClass(“main-cl”); } function suggestionKeyHandler(e) { el = $(e.target); str = el.val().trim(); item_len = $(‘.’ + suggestion_list_item).children().length; data = []; if (e.keyCode == 40) { /* down key */ e.preventDefault(); if (current_cursor 0) { el.val(s_item_content); } else { el.val(search_key); } } else if (e.keyCode == 38) { /* up key */ e.preventDefault(); if (current_cursor > 0) { current_cursor–; } else { current_cursor = item_len; } jQuery(suggestion_item_id).removeClass(“active”); jQuery(suggestion_nth_item + “(” + current_cursor + “)”).addClass(“active”); s_item_content = jQuery(suggestion_nth_item + “(” + current_cursor + “)”).text(); if (s_item_content.length > 0) { el.val(s_item_content); } else { el.val(search_key); } } else if (e.keyCode == 27) { /* esc key */ hideSuggestionBox(); } else { current_cursor = 0; } } function suggestionMouseHandler(e) { if (e.which == 3) { return false; } /* if the target of the click isn’t the container nor a descendant of the container */ if (!container.is(e.target) && !$(“#” + searchelid).is(e.target)) { hideSuggestionBox(); } if ($(e.target).parents().hasClass(suggestion_list_item)) { s_item_content = jQuery(e.target).text(); if (e.target.tagName == “SPAN”) { s_item_content = jQuery(e.target).parent(“li”).text(); } if (s_item_content.length) { $(“#” + searchelid).val(s_item_content); container.submit(); } } } $(document).ready(function () { $(document).on(‘mouseup’, function (e) { suggestionMouseHandler(e); }); $(“#” + searchelid).on(‘keydown’, function (e) { suggestionKeyHandler(e); }); $(“#” + searchelid).on(‘input focus’, function (e) { autocomplete(e); }); }); ]]>
  • Featured Newest Arrivals Price: Low to High Price: High to Low Review: Top Rated Sort by

    We are sorry!

    Your search keyword did not match any product, try using different keyword.

    The ultimate unique product selection is on its way

    encodeURI(`${key}:${custom_filters_new[key]}`)).join(‘::’); if (custom_filters_qs !== ”) { queryParameters[‘cf’] = encodeURI(custom_filters_qs); } else if (typeof queryParameters[‘cf’] !== ‘undefined’) { delete queryParameters[‘cf’]; } } else { if (typeof queryParameters[‘cf’] !== ‘undefined’) delete queryParameters[‘cf’]; } if (price_range != “”) { queryParameters[‘price_range’] = price_range; } else { if (typeof queryParameters[‘price_range’] !== ‘undefined’) delete queryParameters[‘price_range’]; } if (page > 1) { queryParameters[‘page’] = page; } if (lang !== “”) { queryParameters[‘lang’] = lang; } var new_url = [location.protocol, ‘//’, location.host, location.pathname].join(”); if (!jQuery.isEmptyObject(queryParameters)) { new_url = new_url + “?” + serializeSearchUrl(queryParameters, true); } if (location.href != new_url) { var stateObj = { url: new_url }; window.history.pushState(stateObj, null, new_url); } } function redirectToScrap(){ var queryParameters = {}, queryString = location.search.substring(1), re = /([^&=]+)=([^&]*)/g, m; while (m = re.exec(queryString)) { if (m[1] !== “page” && m[2] !== “”) { queryParameters[decodeURIComponent(m[1])] = (m[2]); } } if (sort_by !== “”) { queryParameters[‘sort_by’] = sort_by; } queryParameters[‘ubuy’] = 1; var new_url = [location.protocol, ‘//’, location.host, location.pathname].join(”); if (!jQuery.isEmptyObject(queryParameters)) { new_url = new_url + “?” + serializeSearchUrl(queryParameters, true); } window.location = new_url; } function getCheckedBoxes(chkboxName) { var checkboxes = document.getElementsByName(chkboxName); var checkboxesChecked = []; // loop over them all for (var i = 0; i 0 ? checkboxesChecked : null; } function checkUniqueProducts(list) { jQuery(document).find(‘div.’ + list).each(function () { var name = jQuery(this).find(‘a’).attr(‘title’); if (jQuery.inArray(name, product_unique_arr) == “-1”) { product_unique_arr.push(name); } else { jQuery(this).remove(); } }); } function checkNoItems() { if (jQuery(“.product-outer-list”).length) { no_items = false; } if (no_items) { showLoaderImageAbs(); } else { hideLoaderImageAbs(); } } function isValidHttpUrl(string) { let url; try { url = new URL(string); } catch (_) { return false; } return url.protocol === “http:” || url.protocol === “https:”; } function getProductsForStore() { jQuery(“.loadmore-bt”).hide(); resetPageScroll(); if( ubuy_store == “hk” || ubuy_store == “eu” || ubuy_store == “in” || ubuy_store == “tr” || ubuy_store == “kr” ){ filter_type = “sc”; new_loader = 1; total_es_products = 0; getFirstScrapping(); changeCurrentUrl(); if (hasUbuyCategoryTopProduct() == false) { showLoaderImageAbs(); } else { scrapping_no++; showDotLoader(); } var price_range_selected = jQuery(‘input[name=price_usstore]:checked’).val(); console.log(price_range_selected); if (typeof price_range_selected !== typeof undefined) { price_range = price_range_selected; } return “” } // removeFilterSidebarMobile(); jQuery(‘html,body’).animate({ scrollTop: 0 }, 0); var query = q; // if (is_cat_search) { // query = “”; // } /*if (jQuery(‘input[name=ufulfilled]:checked’).length > 0) { ufulfilled = 1; } else { ufulfilled = “”; }*/ var price_range_selected = jQuery(‘input[name=price_usstore]:checked’).val(); if (typeof price_range_selected !== typeof undefined) { price_range = price_range_selected; } if (load_time == 1) { if (hasUbuyCategoryTopProduct() == false) { showLoaderImageAbs(); } else { scrapping_no++; showDotLoader(); } } var csrftoken_search = ‘40513df81ff6fa2a48df5f3e53526eaesearch’; var search_type = ” if (is_brand_search) { search_type = ‘brand’; } if (is_cat_search) { search_type = ‘category’; } if (search_type == ‘category’ && query == “” ){ removeAECTProduct(); html_ = `

    We are sorry!

    Your search keyword did not match any product, try using different keyword. ]]>

    `;
    jQuery(“#usstore-products”).append(html_);
    jQuery(“#s-sidebar-filter”).html(“”);
    return;
    }

    var requestData = {
    q: query,
    node_id: node_id,
    page: page,
    brand: brand,
    ufulfilled: ufulfilled,
    price_range: price_range,
    sort_by: sort_by,
    s_id: ’31’,
    lang: lang,
    dc: dc,
    search_type: search_type,
    skus:all_products_sku,
    store:ubuy_store,
    csrf_token:csrftoken_search
    };

    requestData = Object.assign(requestData, custom_filters);
    // requst_base64 = window.btoa(JSON.stringify(requestData));
    ajaxRequest = jQuery.ajax({
    type: “GET”,
    dataType: “html”,
    data: requestData,
    // data: {“req”:requst_base64},
    headers: {
    ‘Cache-Control’: ‘max-age=10’
    },
    url: esonesearch_url + “?ubuy=” + ubuy + “&docType=”+ubuyType,
    success: function (response,textStatus,jqXHR) {
    if(jqXHR.status == 204 || jqXHR.status == 203){
    window.location = window.location.href;
    }

    load_time = 1;
    if (blank == “1”) {
    return false;
    }
    if (isValidHttpUrl(response)) {
    location.href = response;
    return false;
    }

    removeAECTProduct();
    jQuery(“#usstore-products”).append(response);

    jQuery(“.no-product”).removeClass(‘d-none’);
    jQuery(‘#usstore-products’).css(“display”, “none”);
    jQuery(‘#usstore-products’).fadeIn();

    if (typeof productListPagination !== ‘undefined’) {
    jQuery(“#product-list-pagination”).html(productListPagination);
    } else {
    jQuery(“#product-list-pagination”).html(”);
    }
    var all_brands = jQuery(“#all_brands”).val();
    var all_categories = jQuery(“#all_categories”).val();

    var total_es_products = jQuery(“#es_products_count”).val();
    if (total_es_products >=1) {
    getFiltersForUsStore(all_brands, all_categories, query);
    }
    else{
    jQuery(“.loader-spin”).hide();
    }

    if (total_es_products == 0) {
    new_loader = 1;
    jQuery(“.new_loader”).show();
    }

    console.log(“total_es_products===”+total_es_products);
    console.log(“es_filter_status===”+es_filter_status);

    var all_skus = jQuery(“#all_skus”).val();
    //checkallimages(all_skus);

    if(total_es_products <= 8){ filter_type = "sc"; getFirstScrapping(); } if (hasUbuyCategoryTopProduct() == false) { showLoaderImageAbs(); } else { scrapping_no++; showDotLoader(); } changeCurrentUrl(); no_items = true; product_unique_arr = []; stickySearchFilter("#usstore-product-block-section"); isComplete = (isLoadEmpty(response) == false) ? true : false; isComplete = jQuery(".item-view").length == 0 ? false : true; /*===========*/ moniterPageScroll("us", isComplete); //not in use /*===========*/ if (brand !== "") { topBrands(); } hideLoaderImageAbs(); document.getElementsByTagName('main')[0].scrollTo(0,0); if (customer_id != "") { updatewishlist(); } }, error: function (jqXHR, textStatus, errorThrown) { //redirectToScrap(); getFirstScrapping(); }, timeout: 20000 }); } function getFirstScrapping(){ var current_store = ""; if(ubuy_store == "us"){ current_store = "usstore"; } else if(ubuy_store == "uk"){ current_store = "ukstore"; } else if(ubuy_store == "eu"){ current_store = "destore"; } else if(ubuy_store == "in"){ current_store = "instore"; } else if(ubuy_store == "ch"){ current_store = "jd"; } else if(ubuy_store == "hk"){ current_store = "china"; } else if(ubuy_store == "kr"){ current_store = "gmarket"; } else if(ubuy_store == "jp"){ current_store = "jpstore"; } else if(ubuy_store == "tr"){ current_store = "trendyol"; } if(current_store){ getProductAppendData(current_store); } } function showNoRecord(){ // if(jQuery(".product-inner-list").length == 0){ // jQuery(".search-result-text").addClass("d-none"); // jQuery("#s-sidebar-filter").addClass("d-none"); // jQuery("#usstore-products").hide(); // jQuery("#no-product-screen").removeClass("d-none"); // jQuery("#no-product-screen").css('display','block'); // } if(jQuery(".product-inner-list").length == 0){ jQuery(".new_loader").hide(); jQuery("#dot-loader").hide(); jQuery(".no-product").show(); jQuery(".search-result-text").addClass("d-none"); jQuery("#s-sidebar-filter").addClass("d-none"); jQuery("#usstore-products").hide(); jQuery("#no-product-screen").removeClass("d-none"); jQuery("#no-product-screen").css('display','block'); }else{ } } function callNextScrappingStore(){ next_call_status = 0; if (isUsstore == false) { getProductAppendData("usstore"); } else if (isMart == false) { getProductAppendData("mart"); } else if (isUsed == false) { getProductAppendData("used"); } else if (isTarget == false) { getProductAppendData("target"); } else if (isGShopping == false) { getProductAppendData("gshopping"); } else if (isHomeDepot == false) { getProductAppendData("homedepot"); } else if (isUkstore == false) { getProductAppendData("ukstore"); } else if (isDedr == false) { getProductAppendData("dedr"); } else if (isDestore == false) { getProductAppendData("destore"); } else if (isInstore == false) { getProductAppendData("instore"); } else if (isInny == false) { getProductAppendData("inny"); } else if (isInfl == false) { getProductAppendData("infl"); } else if (isInsp == false) { getProductAppendData("insp"); } else if (isInaj == false) { getProductAppendData("inaj"); } else if (isUseduk == false) { getProductAppendData("useduk"); } else if (isAsos == false) { getProductAppendData("asos"); } else if (isArgos == false) { getProductAppendData("argos"); } else if (isZland == false) { getProductAppendData("zlnduk"); } else if (isJd == false) { getProductAppendData("jd"); } else if (isJdajax == false) { getProductAppendData("jdajax"); } else if (isYou163 == false) { getProductAppendData("you163"); } else if (isTaobao == false) { getProductAppendData("taobao"); } else if (isJpstore == false) { getProductAppendData("jpstore"); } else if (isUsedjp == false) { getProductAppendData("usedjp"); } else if (isJpzen == false) { getProductAppendData("jpzen"); } else if (isJpstore == false) { getProductAppendData("jpfr"); } else if (isChina == false) { getProductAppendData("china"); } else if (isGmarket == false) { getProductAppendData("gmarket"); } else if (isTrendyol == false) { getProductAppendData("trendyol"); } if(next_call_status == 0){ showNoRecord(); } } function getShowMoreActive(){ show_more = []; jQuery('.view_more.minus').each(function(){ show_more.push(jQuery(this).attr('data-type')); }) return show_more; } function setShowMoreActive(){ jQuery.each(show_more,function(k,a){ showMoreFilter(jQuery('.view_more[data-type='+a+']')); }); } function showCatChild(elm,datalevel,parentnode){ // var parnet_node = jQuery(elm).attr('data-id'); var parentElm = jQuery(elm).closest('[data-level_val='+datalevel+']'); var nextSiblings = parentElm.siblings('[data-parentnode='+parentnode+']'); var icon = jQuery(elm).find('i'); if(parentElm.hasClass('shown')){ nextSiblings.addClass('d-none'); icon.addClass("fa-chevron-right").removeClass('fa-chevron-down'); parentElm.removeClass('shown'); jQuery.each(nextSiblings,function(){ if(jQuery(this).hasClass('shown')){ // also close the child categories var nextSibling = jQuery(this); var nextelm = nextSibling.find('.togglecat_subcat'); var nextParentNodeId= nextSibling.find('.filter-category-checkbox').attr('data-id'); var nextdatalevel = nextSibling.attr('data-level_val'); showCatChild(nextelm,nextdatalevel,nextParentNodeId); } }); }else{ nextSiblings.removeClass('d-none'); icon.addClass("fa-chevron-down").removeClass('fa-chevron-right'); parentElm.addClass('shown'); } return false; } function getFiltersForUsStore(all_brands, all_categories, query,is_scrap=false) { getShowMoreActive(); if (ubuy_store == "hk" || ubuy_store == "ch") { jQuery(".desktop-filter-sort-by").hide(); jQuery(".sort_by_mobile_div").hide(); } if (ubuy_store == "hk" || ubuy_store == "kr") { jQuery("#s-sidebar-filter").html(""); showClearAllFilter(); setShowMoreActive(); showActiveParentCategory(); showInterlinkingFooter(); return ""; } var search_type = '' var request_type = 'GET' if(is_scrap==false){ request_type = 'GET' all_brands=[] all_categories=[] } if (is_brand_search) { search_type = 'brand'; } if (is_cat_search) { search_type = 'category'; } if (ubuy_store == "tr") { request_type = 'POST'; } var csrftoken_search = '40513df81ff6fa2a48df5f3e53526eaesearch'; var requestData = { q: query, node_id: node_id, brand: brand, ufulfilled: ufulfilled, price_range: price_range, all_brands: all_brands, all_categories: all_categories, s_id: '31', search_type:search_type, filter_type: filter_type, is_scrap: is_scrap, lang: lang, store:ubuy_store, csrf_token:csrftoken_search } requestData = Object.assign(requestData, custom_filters); requst_base64 = window.btoa(JSON.stringify(requestData)); if (ubuy_store == "tr") { requestData = {"req":requst_base64}; } ajaxFilterRequest = jQuery.ajax({ type: request_type, data: requestData, // data: {"req":requst_base64}, url: esonesearch_filter_url + "?ubuy=" + ubuy, dataType: "html", beforeSend:function(){ abortPreviousAjaxFilterRequest(); }, success: function (response) { jQuery("#s-sidebar-filter").html(response); es_filter_status = jQuery("#es_filter_status").val(); showClearAllFilter(); setShowMoreActive(); showActiveParentCategory(); showInterlinkingFooter(); } }); } function showInterlinkingFooter() { var brands = jQuery("#bjson").val(); var categories = jQuery("#cjson").val(); jQuery.ajax({ type: "POST", data: { all_brands: brands, all_categories: categories, lang: lang, searchqtr: "Electronics", is_brand_url: is_brand_url, is_category_url: is_category_url }, url: interlink_url, dataType: "html", success: function (resp) { jQuery("#bottom-filter-brands").html(resp); } }); } /*===== Store Function Start======*/ function showActiveParentCategory(){ if(jQuery(".list-group-item").length < 5){ jQuery(".list-group-item").each(function (index, value) { jQuery(this).find("i").removeClass("fa-chevron-right"); jQuery(this).find("i").addClass("fa-chevron-down"); }); jQuery(".list-group-item").removeClass("d-none"); jQuery(".list-group-item").addClass("shown"); } } function resetSingleStorePageScroll(current) { if (current == "usstore") { isUsstore = true; } else if (current == "mart") { isMart = true; } else if (current == "used") { isUsed = true; } else if (current == "target") { isTarget = true; } else if (current == "samsclub") { isSamsclub = true; } else if (current == "gshopping") { isGShopping = true; } else if (current == "homedepot") { isHomeDepot = true; } else if (current == "ukstore") { isUkstore = true; } else if (current == "destore") { isDestore = true; } else if (current == "instore") { isInstore = true; } else if (current == "inny") { isInny = true; } else if (current == "infl") { isInfl = true; } else if (current == "insp") { isInsp = true; } else if (current == "inaj") { isInaj = true; } else if (current == "dedr") { isDedr = true; } else if (current == "argos") { isArgos = true; } else if (current == "useduk") { isUseduk = true; } else if (current == "asos") { isAsos = true; } else if (current == "zlnduk") { isZland = true; } else if(current == "jd"){ isJd = true; } else if(current == "jdajax"){ isJdajax = true; } else if(current == "you163"){ isYou163 = true; } else if(current == "taobao"){ isTaobao = true; } else if(current == "jpstore"){ isJpstore = true; } else if(current == "usedjp"){ isUsedjp = true; } else if(current == "jpzen"){ isJpzen = true; } else if(current == "jpfr"){ isJpfr = true; } else if(current == "china"){ isChina = true; } else if(current == "gmarket"){ isGmarket = true; } else if(current == "trendyol"){ isTrendyol = true; } } function getProductAppendData(next_store) { console.log("append request==="+next_store); resetSingleStorePageScroll(next_store); next_call_status = 1; all_products_sku = jQuery("#all_skus").val(); var query = q; s_node_id=node_id; if (node_id && ubuy_store == "us" || ubuy_store == "in" || ubuy_store == "tr" || ubuy_store == "eu" || ubuy_store == "ch" ) { // query = ""; }else{ s_node_id = ""; } if (jQuery('input[name=ufulfilled]:checked').length > 0) {
    ufulfilled = 1;
    }

    var price_range_selected = jQuery(‘input[name=price_usstore]:checked’).val();
    if (typeof price_range_selected !== typeof undefined) {
    price_range = price_range_selected;
    }

    checkajaxrequest();
    if (new_loader == 0) {
    scrapping_no++;
    showDotLoader();
    }

    var csrftoken_search = ‘40513df81ff6fa2a48df5f3e53526eaesearch’;
    var search_type = ”;
    if (is_brand_search && ubuy_store == “us”) {
    search_type = ‘brand’;
    }
    if (is_cat_search) {
    search_type = ‘category’;
    }
    var total_es_products = jQuery(“#es_products_count”).val();
    var total_products_fetched = jQuery(“.product-inner-list”).length;
    next_append_request = 1;
    var brand_request = brand;
    var brand_selected = [];
    var brand_exist = 0;
    jQuery(“input[name=’brand’]:checked”).each(function() {
    brand_exist = 1;
    var value = jQuery(this).attr(“data-name”);

    console.log(“selected brand name: “+ value);
    value = value.replace(” “, “+”);
    brand_selected.push(value);
    });
    if(brand_exist == 1){
    brand_request = brand_selected.join(‘|’);
    }
    //}
    var search_type_append_request = search_type;
    //search_type_append_request = “”;

    if(next_store == “china” && brand_request != “” ){
    query = brand_request;
    brand_request = “”;
    }

    var requestData = {
    q: query,
    node_id: s_node_id,
    page: page,
    brand: brand_request,
    ufulfilled: ufulfilled,
    price_range: price_range,
    sort_by: sort_by,
    s_id: ’31’,
    lang: lang,
    dc: dc,
    search_type: search_type_append_request,
    skus:all_products_sku,
    next_store:next_store,
    is_scrap:1,
    es_count:total_es_products,
    store:ubuy_store,
    total_fetched:total_products_fetched,
    es_filter_status:es_filter_status,
    csrf_token:csrftoken_search
    };
    requestData = Object.assign(requestData, custom_filters);
    requst_base64 = window.btoa(JSON.stringify(requestData));

    ajaxRequest = jQuery.ajax({
    type: “GET”,
    headers: {
    ‘Cache-Control’: ‘max-age=10′
    },
    data: requestData,
    // data: {“req”:requst_base64},
    url: esonesearch_url + “?ubuy=” + ubuy,
    dataType: “html”,
    success: function(response,textStatus,jqXHR) {
    if(jqXHR.status == 204 || jqXHR.status == 203){
    window.location = window.location.href;
    }
    //jQuery(“#all_skus”).remove();

    if ((next_store == “instore” || next_store == “trendyol” || next_store == “destore” || next_store == “gmarket”) && page == 1 ) {
    removeAECTProduct();
    }

    if(ubuy_store == “hk” || ubuy_store == “eu” || ubuy_store == “in” || ubuy_store == “tr” || ubuy_store == “kr” ){
    var data_con = getStringBetween(response, “scrap_products_count”, ” />”)
    data_con = data_con.match(/d+/g);
    data_con = data_con.map(Number);
    if (scrapping_status == false) {
    removeAECTProduct();
    }
    if (data_con > 0 ) {
    scrapping_status = true;
    }
    hideLoaderImageAbs();
    showClearAllFilter();
    }

    jQuery(“#usstore-products”).append(response);
    next_append_request = 0;
    var s_result_count = jQuery(“#scrap_products_count_”+next_store).val();
    if(s_result_count > 0 && total_es_products > 0){
    jQuery(“#new_release_products_display_title”).removeClass(“d-none”);
    }

    if (s_result_count > 0 || total_es_products > 0 ) {

    new_loader == 0
    jQuery(“.new_loader”).hide();
    }
    console.log(mainStores.indexOf(next_store));
    console.log(total_es_products + “total_es_products”);

    console.log(s_result_count + “s_result_count 2024”);

    console.log(next_store + “next_store 2024”);
    if(mainStores.indexOf(next_store) >= 0 && (typeof total_es_products==’undefined’ || isNaN(total_es_products) || parseInt(total_es_products)<=0 /*|| es_filter_status <= 0*/)){ var all_brands = jQuery("#all_brands_sc").val(); var all_categories = jQuery("#all_categories_sc").val(); var has_brandfilter = jQuery('.es-brand-filter').length; var has_catfilter = jQuery('.es-category-filter').length; if (has_catfilter==0 && has_brandfilter==0 ) { console.log("scrapping filter called") console.log(has_catfilter+" "+has_brandfilter) getFiltersForUsStore(all_brands, all_categories, query,true); } } isComplete = (isLoadEmpty(response) == false) ? true : false; if( s_result_count == 0 && ( next_store == 'usstore' || next_store == 'ukstore' || next_store == 'jpstore') ){ jQuery(".loader-spin").hide(); jQuery(".loadmore-bt").hide(); } var count_id = jQuery("#scrap_products_count_"+next_store).val(); if(count_id == 0){ callNextScrappingStore(); } moniterPageScroll(next_store, isComplete); if(jQuery(".loadmore-bt").length){ jQuery(".loadmore-bt").prop('disabled', false); jQuery(".loadmore-bt").html('Load More'); } if(jQuery(".see-translation").length>1){
    jQuery(“.see-translation”).last().parent().remove();
    }

    },
    error: function(jqXHR, textStatus, errorThrown) {
    isComplete = false;
    next_append_request = 0
    moniterPageScroll(next_store, isComplete);
    }

    });

    /* here we get next store data from scrap request*/
    }

    function getStringBetween(originalString, startString, endString) {
    var startIndex = originalString.indexOf(startString);
    if (startIndex === -1) {
    return “”;
    }

    var endIndex = originalString.indexOf(endString, startIndex + startString.length);
    if (endIndex === -1) {
    return “”;
    }
    return originalString.substring(startIndex + startString.length, endIndex);
    }

    function getLastStore(){
    var last_store = “”;
    switch(ubuy_store) {
    case “us”:
    last_store = “target”
    break;
    case “uk”:
    last_store = “zlnduk”
    break;
    case “ch”:
    last_store = “taobao”
    break;
    case “hk”:
    last_store = “china”
    break;
    case “kr”:
    last_store = “gmarket”
    break;
    case “jp”:
    last_store = “jpfr”
    break;
    case “tr”:
    last_store = “trendyol”
    break;
    case “eu”:
    last_store = “dedr”
    break;
    case “in”:
    last_store = “inaj”
    break;
    default:
    // code block
    }
    return last_store;
    }
    function moniterPageScroll(current, isComplete) {
    /**/
    if(next_append_request == 1){
    return false;
    }
    scrapping_no_hide++;
    //”gshopping”, /* “lyst”, */ “gap”,
    let whatNext = [“usstore”,”mart”,”used”,”target”,”gshopping”,”homedepot”,”ukstore”,”destore”,”inny”,”infl”,”insp”,”inaj”,”instore”,”dedr”,”argos”,”zlnduk”,”asos”,”jd”,”jdajax”,”taobao”,”you163″,”jpstore”,”usedjp”,”jpzen”,”jpfr”,”china”,”gmarket”,”trendyol”];
    if (scrapping_no == scrapping_no_hide) {
    hideDotLoader();
    }else{
    var dot_src = $(‘.dot-loader-image’).attr(‘src’);
    console.log(dot_src)
    $(‘.dot-loader-image’).attr(‘src’, dot_src+’?time_=1718523726′);
    }
    let last = getLastStore();

    hideLoaderImageAbs();
    if (product_unique_arr.length > 0 && current != “china”) {
    let noProductElement = document.querySelector(“div.no-product”);
    if (noProductElement) {
    noProductElement.remove();
    }
    }
    console.log(“current ” + current + ” last ” + last );
    /*remove filter*/
    if (current == last && jQuery(“.product-outer-list”).length == 0) {

    jQuery(“.no-product”).removeClass(‘d-none’);

    let noFilterElement = document.querySelector(“div#aside”);
    if (noFilterElement) {
    noFilterElement.remove();
    }
    let noSortElement = document.querySelector(“.search_sorting”);
    if (noSortElement) {
    noSortElement.remove();
    }
    let storeElement = document.querySelector(“div#store”);
    // storeElement.classList.remove(“col-md-9”);
    // storeElement.classList.add(“col-md-12”);
    let noProductElement = document.querySelector(“div.no-product”);
    jQuery(“#search-result-title”).remove();
    }
    else {

    jQuery(window).on(‘scroll’, function () {
    if (isScrollReachToElement(jQuery(‘#load-other-store’))) {
    console.log(“isDedr===”+isDedr)
    if (isUsstore == false) {
    getProductAppendData(“usstore”);
    }
    else if (isMart == false) {
    getProductAppendData(“mart”);
    } else if (isUsed == false) {
    getProductAppendData(“used”);
    } else if (isTarget == false) {
    getProductAppendData(“target”);
    } else if (isGShopping == false) {
    getProductAppendData(“gshopping”);
    } else if (isHomeDepot == false) {
    getProductAppendData(“homedepot”);
    } else if (isUkstore == false) {
    getProductAppendData(“ukstore”);
    } else if (isDestore == false) {
    getProductAppendData(“destore”);
    } else if (isInstore == false) {
    getProductAppendData(“instore”);
    } else if (isInny == false) {
    getProductAppendData(“inny”);
    } else if (isInfl == false) {
    getProductAppendData(“infl”);
    } else if (isInsp == false) {
    getProductAppendData(“insp”);
    } else if (isInaj == false) {
    getProductAppendData(“inaj”);
    } else if (isDedr == false) {
    getProductAppendData(“dedr”);
    } else if (isUseduk == false) {
    getProductAppendData(“useduk”);
    } else if (isAsos == false) {
    getProductAppendData(“asos”);
    } else if (isZland == false) {
    getProductAppendData(“zlnduk”);
    } else if (isArgos == false) {
    getProductAppendData(“argos”);
    } else if (isJd == false) {
    getProductAppendData(“jd”);
    } else if (isJdajax == false) {
    getProductAppendData(“jdajax”);
    } else if (isYou163 == false) {
    getProductAppendData(“you163”);
    } else if (isTaobao == false) {
    getProductAppendData(“taobao”);
    } else if (isJpstore == false) {
    getProductAppendData(“jpstore”);
    } else if (isUsedjp == false) {
    getProductAppendData(“usedjp”);
    } else if (isJpzen == false) {
    getProductAppendData(“jpzen”);
    } else if (isJpfr == false) {
    getProductAppendData(“jpfr”);
    } else if (isChina == false) {
    getProductAppendData(“china”);
    } else if (isGmarket == false) {
    getProductAppendData(“gmarket”);
    } else if (isTrendyol == false) {
    getProductAppendData(“trendyol”);
    }
    }
    });
    }
    mobileFilterSticky();
    }
    function resetPageScroll() {
    product_unique_arr = [];
    isUsstore = isMart = isUsed = isGShopping = isTarget = isHomeDepot = true;
    isUkstore = isUseduk = isAsos = isArgos = true;
    isJd = isJdajax = isYou163 = true;
    isJpstore = isUsedjp = isJpzen = isJpfr = true;

    isGmarket = true;
    isChina = true;
    isTrendyol = true;
    switch(ubuy_store) {
    case “us”:
    isUsstore = isMart = isUsed = isGShopping = isTarget = isHomeDepot = false;
    //isTarget = true;
    isGShopping = true;
    isHomeDepot = true;
    break;
    case “uk”:
    isUkstore = isUseduk = isAsos = isArgos = isZland = false;
    break;
    case “eu”:
    isDestore = isDedr = false;
    break;
    case “in”:
    isInstore = isInny = isInfl = isInsp = isInaj = false;
    break;
    case “ch”:
    isJd = isJdajax = isYou163 = false;
    break;
    case “hk”:
    isChina = false;
    break;
    case “kr”:
    isGmarket = false;
    break;
    case “jp”:
    isJpstore = isUsedjp = isJpzen = isJpfr = false;

    break;
    case “tr”:
    isTrendyol = false;
    break;
    default:
    }

    }

    function hasUbuyCategoryTopProduct() {
    if (jQuery(‘.ubuycat-list’).length > 0) {
    return (jQuery(‘.ubuycat-list’).css(‘display’) == ‘none’) ? false : true;
    }
    return false;
    }

    function isScrollReachToElement(elm, eval) {
    eval = eval || “object visible”;
    var viewportHeight = jQuery(window).height(),
    scrolltop = jQuery(window).scrollTop(),
    y = jQuery(elm).offset().top – 100,
    elementHeight = jQuery(elm).height();
    if (eval == “object visible”)
    return ((y < (viewportHeight + scrolltop)) && (y > (scrolltop – elementHeight)));
    if (eval == “above”)
    return ((y < (viewportHeight + scrolltop))); } /*===== Store Function End=======*/ // function hasUbuyCategoryTopProduct() { // if (jQuery('.ubuycat-list').length > 0) {
    // return (jQuery(‘.ubuycat-list’).css(‘display’) == ‘none’) ? false : true;
    // }
    // return false;
    // }
    function hideUbuyCategoryTopProduct() {
    jQuery(‘.ubuycat-list’).hide();
    }
    function showUbuyCategoryTopProduct() {
    jQuery(‘.ubuycat-list’).show();
    }
    function removeAECTProduct() {
    jQuery(“#usstore-products”).children().not(‘.ubuycat-list’).remove();
    }
    function setSortByFilterText() {

    jQuery(“.sort-by-item”).removeClass(“active”);
    jQuery(“.sort-by-item”).each(function (index, value) {
    var sort_by_item = jQuery(this).attr(‘data-value’);

    if (sort_by_item == sort_by) {
    var sort_by_item = jQuery(this).text();
    sort_by_text = sort_by_item;
    jQuery(this).addClass(“active”);
    jQuery(“#sort-by-button”).html(sort_by_item);
    return false;
    }
    if (sort_by == “”) {
    jQuery(“.sort-by-item:first”).addClass(“active”);
    }

    });
    }
    function loadMoreData(){
    abortPreviousAjaxRequest();

    page = jQuery(“.loadmore-bt”).data(“currentpage”);
    jQuery(“.loadmore-bt”).prop(‘disabled’, true);
    jQuery(“.loadmore-bt”).html(‘Load More‘);
    page++;
    if(page>=totalPageCustom){
    jQuery(“.loadmore-bt”).hide();
    }
    resetPageScroll();
    getFirstScrapping();
    //getProductAppendData(“usstore”);
    }
    setSortByFilterText();
    jQuery(document).ready(function () {
    jQuery(document).on(“click”, “#usstore-filter-button”, function () {

    abortPreviousAjaxRequest();
    page = 1;
    hideUbuyCategoryTopProduct();
    getProductsForStore();
    });

    jQuery(document).on(“click”, “a[data-toggle=’page-usstore’]”, function () {
    abortPreviousAjaxRequest();
    page = jQuery(this).data(“pageno”);
    if (page == 1) {
    showUbuyCategoryTopProduct()
    } else {
    hideUbuyCategoryTopProduct();
    }
    getProductsForStore();
    jQuery(‘html,body’).animate({
    scrollTop: 0
    }, 0);
    });
    jQuery(document).on(“click”, “button[data-toggle=’page-usstore’]”, function () {
    abortPreviousAjaxRequest();
    page = jQuery(this).data(“pageno”);
    if (page == 1) {
    showUbuyCategoryTopProduct()
    } else {
    hideUbuyCategoryTopProduct();
    }
    getProductsForStore();
    jQuery(‘html,body’).animate({
    scrollTop: 0
    }, 0);
    });
    jQuery(document).on(“click”, “a[data-toggle=’locale’]”, function () {
    abortPreviousAjaxRequest();
    lang = jQuery(this).data(“code”);
    hideUbuyCategoryTopProduct();
    getProductsForStore();
    jQuery(‘html,body’).animate({
    scrollTop: 0
    }, 0);
    });
    jQuery(document).on(“click”, “.sort-by-item”, function () {
    sort_by_text = jQuery(this).text();

    jQuery(“#sort-by-button”).html(sort_by_text);
    abortPreviousAjaxRequest();
    page = 1;

    var sort_text = jQuery(this).attr(“data-value”);
    if (sort_by != sort_text) {
    sort_by = sort_text;
    } else {
    return false;
    }
    hideUbuyCategoryTopProduct();
    getProductsForStore();
    showClearAllFilter();
    setSortByFilterText();
    });
    jQuery(document).on(“change”, “#usstore_sm_sort_by”, function () {
    abortPreviousAjaxRequest();
    page = 1;
    sort_by = jQuery(this).val();
    hideUbuyCategoryTopProduct();
    getProductsForStore();
    setSortByFilterText();
    showClearAllFilter();
    });
    // new UI for category filter
    jQuery(document).on(“click”, “.category-filter button”, function() {
    page = 1;
    abortPreviousAjaxRequest();
    if (!is_cat_search) {
    category_status = 1;
    }
    node_id = jQuery(this).attr(“data-id”);
    node_name = jQuery(this).attr(“title”);
    getProductsForStore();
    });

    /*Category Filter*/
    /*jQuery(document).on(“click”, “.filter-category-checkbox”, function () {
    page = 1;
    abortPreviousAjaxRequest();
    if (!is_cat_search) {
    category_status = 1;
    }
    node_id = jQuery(this).attr(“data-id”);
    getProductsForStore();
    });*/
    /*Brand Filter*/
    jQuery(document).on(“click”, ‘input[name=brand]’, function () {
    page = 1;
    brand = “”;
    abortPreviousAjaxRequest();
    var brand_selected = getCheckedBoxes(“brand”);
    if (brand_selected) {
    brand = brand_selected.join(‘|’);
    }
    brand_status = 1;
    getProductsForStore();

    });
    /*Fast delivery*/
    jQuery(document).on(“click”, ‘input[name=ufulfilled]’, function () {
    page = 1;
    abortPreviousAjaxRequest();
    ufulfilled = “”;
    if (jQuery(‘input[name=ufulfilled]:checked’).length > 0) {
    ufulfilled = 1;
    }
    getProductsForStore();
    });
    /*Fast delivery*/
    jQuery(document).on(“change”, ‘input[name=price_usstore]’, function () {
    page = 1;
    abortPreviousAjaxRequest();
    var price_range_selected = jQuery(‘input[name=price_usstore]:checked’).val();
    if (typeof price_range_selected !== typeof undefined) {
    price_range = price_range_selected;
    }
    getProductsForStore();
    });

    // jQuery(document).on(“change”, ‘input[name=price_usstore]’, function () {
    // page = 1;
    // abortPreviousAjaxRequest();
    // var price_range_selected = jQuery(‘input[name=price_usstore]:checked’).val();
    // if (typeof price_range_selected !== typeof undefined) {
    // price_range = price_range_selected;
    // }
    // getProductsForStore();
    // });

    /*custom filters*/
    jQuery(document).on(“change”, ‘.custom_filters’, function () {
    page = 1;
    abortPreviousAjaxRequest();
    selectCustomFilters();
    getProductsForStore();
    });

    jQuery(‘body’).on(‘keyup input’, ‘.brand-search-input.filter-search-input,.custom-filter-search-input’, function (e) {
    var $this = jQuery(this);
    var filter_search_keword = $this.val();
    filter_search_keword = jQuery.trim(filter_search_keword);
    var filter_parent_div = $this.closest(“.checkbox-filter”);
    var filter_div = filter_parent_div.find(“.input-checkbox”);
    if (filter_search_keword == “”) {
    jQuery(filter_div).each(function (index) {
    jQuery(this).removeClass(“hide_li”);
    });
    }
    });

    jQuery(document).on(“click”, “.remove-user-selection[data-type=’brand’]”,function () {
    var currentItem = jQuery(this);
    var current_selection_value = decode_data(jQuery(this).attr(“data-value”));
    var current_selection_type = jQuery(this).attr(“data-type”);
    var brand_exist = 0;

    jQuery(“input[name=” + current_selection_type + “]:checked”).each(function () {
    if(jQuery(this).val() == current_selection_value){
    brand_exist = 1;
    if (jQuery(this).prop(“checked”) == true) {
    jQuery(this).click();
    }
    currentItem.parent().remove();
    }
    });

    if(brand_exist == 0 && jQuery(“input[name=” + current_selection_type + “]:checked”).length == 0){
    currentItem.parent().remove();
    brand = “”;
    getProductsForStore();
    }
    });

    getProductsForStore();
    });

    function makeClearAllFilters(brandNamesArr, filter_type) {
    var stringBrands = ”;
    if (brandNamesArr != null) {
    jQuery(“#user-selection”).removeClass(“d-none”);
    jQuery.each(brandNamesArr, function (index, value) {

    stringBrands += ‘

  • ‘ + value + ‘
  • ‘;
    });
    jQuery(“#user-selected-filters”).append(stringBrands);
    }
    }
    //price range slider
    function priceRangeSliderUpdate(data){
    page = 1;
    abortPreviousAjaxRequest();
    var dfrom = Math.ceil(parseInt(data.input.data(‘dmax’))*data.from_percent/100);
    var dto = Math.ceil(parseInt(data.input.data(‘dmax’))*data.to_percent/100);
    price_range = dfrom+”-“+dto;
    getProductsForStore();
    }

    function selectCustomFilters() {
    custom_filters = cf = {};
    jQuery(‘.custom_filters.filter_1’).each(function () {
    var filter_name = jQuery(this).attr(‘name’);
    var filter_id = jQuery(this).attr(‘data-filter-id’);
    var filter_title = jQuery(this).attr(‘data-filter-title’);
    var filter_selected = getCheckedBoxes(filter_name);
    if (filter_selected) {
    custom_filters[filter_name] = filter_selected.join(‘|’);
    custom_filters[filter_id] = filter_title;
    }
    });
    }

    function encode_data(rawStr){
    return encodeURIComponent(rawStr);
    }

    function decode_data(rawStr){
    return decodeURIComponent(rawStr);
    }

    function showClearAllFilter() {
    /* make Blank to clear all filter div*/
    jQuery(“#user-selection”).addClass(“d-none”);
    jQuery(“#user-selected-filters”).html(“”);
    var textarray = {};

    //ufulfilled
    if (ufulfilled != “”) {
    textarray[“ufulfilled”] = “Express Delivery”;
    makeClearAllFilters(textarray, “ufulfilled”);
    }
    textarray = {};
    //price range
    if (price_range != “”) {
    // var price_text = jQuery(“.price-filter:checked”).parent().text().trim();
    var price_text = jQuery(“#price_range_filter”).data(‘value’);
    textarray[“price_range”] = “Price range: ” + price_text;
    makeClearAllFilters(textarray, “price_range”);
    }
    textarray = {};
    //if brand is exist in search page
    if (sort_by != “” && sort_by != “relevanceblender”) {
    textarray[“sort_by”] = “Sort by: ” + sort_by_text;
    makeClearAllFilters(textarray, “sort_by”);
    }
    textarray = {};

    if (brand != “”) {
    var show_brand = 0;
    jQuery(“input[name=’brand’]:checked”).each(function () {
    var value = encode_data(jQuery(this).val());
    var text = jQuery(this).parent().text().trim();
    textarray[value] = “Brand: ” +text;
    show_brand = 1;
    is_brand_in_url = 0;
    });
    if (show_brand == 1) {
    makeClearAllFilters(textarray, “brand”);
    }
    // if(show_brand == 0 && brand != “”){
    // textarray[brand] = “Brand: ” +brand;
    // makeClearAllFilters(textarray, “brand”)
    // }
    }

    if (custom_filters) {
    var show_custom_filters = 0;
    $.each(custom_filters, function (f_key, f_values) {
    textarray = {};
    var filter_title = jQuery(“input[name='” + f_key + “‘]”).attr(‘data-filter-title’);
    if(filter_title != “” && filter_title != “undefined” && filter_title != null){
    $.each(f_values.split(“|”), function (k, v) {
    var text = v;
    if(f_key == ‘cf[2]’){
    text = (parseInt(v))+” & Up”;
    }
    textarray[v] = filter_title + “: ” + text;
    })
    show_custom_filters = 1;
    makeClearAllFilters(textarray, “‘” + f_key + “‘”);
    }

    });

    if(show_custom_filters == 0){
    $.each(custom_filters, function (f_key, f_values) {
    textarray = {};
    if(f_key.indexOf(“cf”) != -1){
    console.log(f_key)
    var match = f_key.match(/[(.*?)]/);
    console.log(match)
    if (match) {
    console.log(match[1]);
    textarray[match[1]] = custom_filters[match[1]] + “: ” + f_values;
    }
    makeClearAllFilters(textarray, “‘” + f_key + “‘”);
    }
    });
    }

    }

    if (node_id != ”) {
    textarray = {};

    if ( (node_id_main != node_id || category_status != 0 ) && (jQuery(“button[data-id='” + node_id + “‘]”).text() || node_name != “” )) {
    if (jQuery(“button[data-id='” + node_id + “‘]”).text() != “”) {
    textarray[node_id] = “Category: ” + jQuery(“button[data-id='” + node_id + “‘]”).text();
    makeClearAllFilters(textarray, “category-selected”);
    }else if(node_name != “”){
    textarray[node_id] = “Category: ” + node_name;
    makeClearAllFilters(textarray, “category-selected”);
    }
    }
    jQuery(“.remove-user-selection[data-type=’category-selected’]”).on(‘click’, function () {
    userRemoveCategoryFilter();
    });
    }

    //call other filter same as brand if exist
    }
    function userClearAllFilter() {
    sort_by = “”;
    price_range = “”;
    ufulfilled = “”;
    custom_filters = [];
    if (category_status != 0)
    node_id = ”;
    node_name = ”;
    if (brand_status != 0)
    brand = “”;
    changeCurrentUrl();
    if(is_brand_search==1){
    //window.location = [location.protocol, ‘//’, location.host].join(“”)
    window.location = window.location.href;
    }else{
    window.location = window.location.href;
    }
    //window.location = window.location.href;
    }
    function userRemovePriceFilter() {
    price_range = “”;
    showClearAllFilter();
    getProductsForStore();
    }
    function userRemoveCategoryFilter() {
    if (category_status != 0)
    node_id = “”;
    node_name = ”;
    if (category_status == 0)
    node_id = node_id_main;
    showClearAllFilter();
    getProductsForStore();
    }

    var top_brands = [];

    function topBrands() {
    var links = $(“.img-detail”);
    var j = 0;
    links.each(function(index, element) {
    let title = $(element).find(“.product-title”).text();
    let stock_text = $(element).find(“.product-stock-text”).val();
    let text = title.toLowerCase();
    let link = $(element).attr(“href”);
    if (j > 4) {
    return false;
    }
    console.log(“stock_text and”);
    console.log(stock_text);
    if( stock_text != undefined){
    if(stock_text.toLowerCase().indexOf(“in_stock”) != -1){
    top_brands[j] = {};
    top_brands[j].title = title;
    top_brands[j].link = link;
    j++;
    }
    }

    });
    if (top_brands.length >= 1) {
    jQuery(“#top_brand_faq”).removeClass(“d-none”);
    var final_html = ‘

      ‘;
      jQuery.each(top_brands, function(index, value) {
      var html = “

    • ” + value.title + “
    • “;
      final_html += html;

      });
      final_html += “


    jQuery(“.top-brand-product”).html(final_html);
    }
    }

    function updatewishlist(){
    var wishlist_variation_sku = ‘{}’;
    var wishlist_parent_sku = ‘{}’;
    var w_l_sku = “”;
    $(“.newwishlist”).map(function() {
    w_l_sku = $(this).data(“sku”);

    if (wishlist_variation_sku.includes(w_l_sku+””) || wishlist_parent_sku.includes(w_l_sku+””) ) {
    $(this).addClass(‘active’);
    }else{
    $(this).removeClass(‘active’);
    }

    }).get();
    }

    function checkajaxrequest(){
    if ($.active) {
    $(“#dot-loader”).show();

    setTimeout(function() {
    checkajaxrequest();
    }, 1000);
    }else{
    //showNoRecord();
    $(“#dot-loader”).hide();
    }
    }

    function checkonerrorimg(img_this,sku_errorimg,imageUrl){
    console.log(“sku_errorimg ” + sku_errorimg);
    console.log(“imageUrl ” + imageUrl);
    load_src = ‘https://d3ulwu8fab47va.cloudfront.net/skin/frontend/default/ubuycom/images/loading.gif’;
    img_this.src = load_src;
    img_this_set = false;
    updateData = imageUrlUpdate(imageUrl)
    console.log(“updateData img ” + updateData.img);
    if (updateData.status == “1”) {
    img_this.src = updateData.img;
    img_this_set = true;
    }

    if ($.inArray(sku_errorimg, checkimage_sku) !== -1) {
    return;
    }
    checkimage_sku.push(sku_errorimg);
    }

    function imageUrlUpdate(imageUrl){
    if (imageUrl.indexOf(“/images/W/”) !== -1) {
    startIndex = imageUrl.indexOf(‘/images/’);
    endIndex = imageUrl.lastIndexOf(‘/images/’);
    newSubstring = “”;
    newImageUrl = imageUrl.substring(0, startIndex) + newSubstring + imageUrl.substring(endIndex);
    res = {status:”1″,img:newImageUrl}
    } else {
    res = {status:”0″,img:imageUrl}
    }
    return res;
    }

    async function checkImageURL(url, callback) {
    var img = new Image();
    img.onload = async function() {
    await callback(true);
    };
    img.onerror = async function() {
    await callback(false);
    };
    img.src = url;
    }

    async function checkallimages(all_skus){

    if (all_skus != undefined && all_skus != “” ) {
    all_skus_arr = all_skus.split(“,”)
    await Promise.all(all_skus_arr.map(async function(sku) {
    var img_src = $(‘.errorimg_’ + sku).attr(‘data-src’);
    await checkImageURL(img_src, async function(res) {
    if (res) {
    //console.log(“true: ” + img_src);
    } else {
    await checkimage_sku_image.push(sku);
    //console.log(“false: ” + img_src);
    }
    });
    }));

    setTimeout(function(){
    if ( checkimage_sku_image.length >= 1 ) {
    var csrftoken_search = ‘40513df81ff6fa2a48df5f3e53526eaesearch’;
    var requestData_img = { image_data: checkimage_sku_image, store: ubuy_store, csrf_token:csrftoken_search }
    ajaxRequest = jQuery.ajax({
    type: “GET”,
    headers: {
    ‘Cache-Control’: ‘max-age=10’
    },
    data: requestData_img,
    url: checkimage_url + “?ubuy=” + ubuy,
    dataType: “html”,
    success: async function(response,textStatus,jqXHR) {
    response = JSON.parse(response)
    if (response.status == ‘1’ ) {
    image_res_skus = Object.keys(response.image_url)
    image_res_skus.forEach(function(sku_index) {
    console.log(“sku_index” + sku_index);
    console.log(“sku_index image_url ” + response.image_url[sku_index]);
    if (response.image_url[sku_index].indexOf(“/images/W/”) === -1) {
    $(‘.errorimg_’ + sku_index).attr(“src”, response.image_url[sku_index]);
    }
    });
    }

    },
    error: function(jqXHR, textStatus, errorThrown) {
    isComplete = false;
    next_append_request = 0
    moniterPageScroll(next_store, isComplete);
    }

    });
    }
    },3000)
    }

    }

    Like to give feedback ?

    ‘); jQuery.ajax({ url: one_search_feedback_url, data: jQuery(this).serialize(), // serializes the form’s elements. type: “post”, dataType: “json”, success: function(response) { if (response.success) { createCookie(“ubuy_onsfb”, value, 30); jQuery(“#one_search_rating_main”).slideUp(10); jQuery(“#one_search_sucess_result”).removeClass(“d-none”).slideDown(10); jQuery(“#final_response”).val(response); jQuery(‘#one-search-feedback-alert-button’).addClass(“d-none”); oneSearchFormReset(); } else if (response.message != “”) { jQuery(“#one-search-wrong-error”).removeClass(“d-none”).html(response.message); } else { jQuery(“#one-search-wrong-error”).removeClass(“d-none”).html(‘Something went wrong! Please try again Later.’); } jQuery(‘#one_search_feed_submit’).removeClass(‘loading’); jQuery(‘#deisgn_feedback_spinner’).remove(); } }); }); function isEmail(email) { var regex = /^([a-zA-Z0-9_.+-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/; return regex.test(email); } function oneSearchFormReset() { jQuery(“#one-search-rating-form”).trigger(“reset”); jQuery(“#one-search-speed-error”).addClass(“d-none”); jQuery(“#one-search-rating-error”).addClass(“d-none”); if (customer_email_id != “”) { jQuery(“input[name=’customer_email_id’]”).val(customer_email_id); } } function showModal() { jQuery(‘#one-search-feedback-alert-button’).removeClass(“d-none”); } jQuery(document).ready(function() { var one_search_page_url = window.location.href; if ((typeof one_search_page_url !== “undefined”) && (one_search_page_url != “”)) { jQuery(“#one_search_page_url”).val(one_search_page_url); } jQuery(“#close_deisgn_popup”).on(“click”, function() { var value = ‘b4b4e03f87042b7de8a707ac07e2ad05’; createCookie(“ubuy_onsfb”, value, 7); jQuery(‘#one-search-feedback-alert-button’).addClass(“d-none”); jQuery(“#one_search_popup_model”).modal(‘hide’); }); jQuery(“#one-search-feedback-alert-button”).on(“click”, function() { jQuery(“#one-search-rating-error”).addClass(“d-none”); jQuery(“#one-search-email-error”).addClass(“d-none”); jQuery(“#one-search-comment-error”).addClass(“d-none”); jQuery(“#one-search-speed-error”).addClass(“d-none”); jQuery(“#done-search-wrong-error”).addClass(“d-none”); jQuery(“#one_search_popup_model”).modal(‘show’); }); jQuery(“input[name=’design_rating’]”).on(“click”, function() { if (jQuery(this).is(“:checked”)) { jQuery(“#one-search-rating-error”).addClass(“d-none”); } }); jQuery(“input[name=’page_speed_rating’]”).on(“click”, function() { if (jQuery(this).is(“:checked”)) { jQuery(“#one-search-speed-error”).addClass(“d-none”); } }); jQuery(‘#design_comment’).on(‘input’, function() { jQuery(“#one-search-comment-error”).addClass(“d-none”); }); jQuery(‘input[name=”customer_email_id”]’).on(‘input’, function() { jQuery(“#one-search-email-error”).addClass(“d-none”); }); var value = ‘b4b4e03f87042b7de8a707ac07e2ad05’; var one_search_feedback_cookie = readCookie(“ubuy_onsfb”); if(one_search_feedback_cookie != value){ setTimeout(showModal, 30000); } }); ]]> { if (flag == 1) { document.querySelector(‘.new-order-from’).classList.remove(‘show’); flag = 0; } else { document.querySelector(‘.new-order-from’).classList.add(‘show’); flag = 1; } }) jQuery(document).on(‘hide.bs.modal’,’#storeChangeModal’, function(){ jQuery(“.body-desktop,.body-android,.body-iphone,.cart”).removeClass(‘stuck-here’); jQuery(“.body-desktop,.body-android,.body-iphone,.cart”).attr(‘style’, ”); }); ]]>

    Similar Collections for Electronics

    Welcome to Ubuy’s Electronics Store – Your One-Stop Destination for Online Electronics Shopping in India!

    At Ubuy, we understand the importance of technology and the role it plays in our everyday lives. That’s why we bring you a wide range of electronic products from top brands, making it convenient for you to shop for all your gadget needs in one place. With just a few clicks, you can find the latest smartphones, laptops, televisions, cameras, and more, all at competitive prices. Whether you’re an avid tech enthusiast or looking to upgrade your devices, Ubuy’s Electronics Store is the perfect destination for you.

    Why Choose Ubuy for Online Electronic Shopping?

    Extensive Selection: Our Electronics Store offers a vast selection of electronic products, ensuring that you’ll find exactly what you’re looking for. From smartphones and laptops to home appliances and gaming consoles, we have it all. We have partnered with leading brands like Samsung, LG, Sony, Apple, Hitachi, Havells, Sylvania and more to provide you with the best quality products.

    Competitive Prices: We understand the value of your hard-earned money. That’s why we offer competitive prices on all our electronic products. You don’t have to compromise on quality to find affordable gadgets. With Ubuy, you can shop for the latest electronics without exceeding your budget.

    User-Friendly Website: Our website is designed to provide you with a seamless shopping experience. It is user-friendly and easy to navigate, allowing you to find your desired products quickly. Simply search for the electronic item you need, browse and compare options, and place your order with just a few clicks.

    Secure Payment Options: We prioritize the security of our customers’ information and transactions. We offer secure payment options, including credit/debit cards, PayPal, and cash on delivery. Rest assured that your financial details are safe and protected when you shop with us.

    Fast and Reliable Delivery: We understand the excitement of receiving your new gadgets. That’s why we strive to offer fast and reliable delivery services. Once you place your order, our team works diligently to ensure that your package reaches you as soon as possible. We also provide package tracking, so you can keep an eye on your order’s journey.

    Excellent Customer Service: At Ubuy, we pride ourselves on our exceptional customer service. Our dedicated team is always ready to assist you with any queries or concerns you may have. We value your satisfaction and work hard to provide a pleasant and hassle-free shopping experience.

    Experience the Convenience of Online Electronics Shopping with Ubuy!

    With Ubuy’s Electronics Store, you can shop for all your electronic needs from the comfort of your home. Browse through our extensive collection of smartphones, laptops, cameras, appliances, and more. Enjoy competitive prices, secure payment options, fast delivery, and excellent customer service. Trust Ubuy to meet all your electronic shopping needs in India. Start exploring our Electronics Store today!

    Frequently Asked Questions About Electronics

    Can I trust Ubuy for online electronic shopping in India?

    Yes, Ubuy is a trusted online platform for electronic shopping in India. We have a vast selection of products from top brands, competitive prices, secure payment options, and excellent customer service. We strive to provide a seamless and reliable shopping experience for our customers.

    Are the electronic products on Ubuy genuine?

    Yes, all the electronic products available on Ubuy are sourced from reputable brands and sellers. We only offer genuine products to ensure the highest quality and customer satisfaction.

    How can I track my order after making a purchase?

    Once your order is placed, you will receive a tracking number. You can use this tracking number to monitor the progress of your order. Simply visit the “Track Order” section on our website and enter your tracking number to get real-time updates on your package.

    What payment methods are accepted on Ubuy?

    We accept various payment options, including credit/debit cards (Visa, Mastercard, etc.), PayPal, and cash on delivery. You can choose the payment method that is most convenient for you during the checkout process.

    What is the return policy for electronic products?

    We have a flexible return policy for electronic products. If you’re not satisfied with your purchase or encounter any issues, you can contact our customer service team for assistance. They will guide you through the return process and help resolve any concerns you may have.

    Are there any warranty options for electronic products?

    Most electronic products on Ubuy come with a manufacturer’s warranty. The warranty details are provided on the product page. If you have any questions regarding the warranty or need additional information, our customer service team will be happy to assist you.

    Is it safe to shop online for electronics?

    Shopping for electronics online can be safe if you choose a reputable and trusted platform like Ubuy. We prioritize the security of our customers’ information and transactions. We use secure payment gateways and encryption protocols to ensure the safety of your personal and financial data.

    Can I get assistance in choosing the right electronic product?

    Absolutely! Our customer service team is available to assist you in choosing the right electronic product based on your requirements and preferences. You can reach out to them via phone or email, and they will provide you with expert advice and recommendations.

    Copyright © 2024 Ubuy Co. All rights reserved.

    0) { jQuery(“#user_cart_count”).addClass(“active”); } else { jQuery(“#user_cart_count”).removeClass(“active”); } } }, complete: function () { } }); } function changeStoreEvent(swap_store) { var customer_id = ”; if (typeof changeStore != “undefined”) { var store_data = {}; user_type = (customer_id != “”) ? “registered” : “guest”; store_data.old_store = ‘us’; store_data.new_store = swap_store store_data.user_id = customer_id store_data.user_type = user_type; changeStore(store_data); } } jQuery(document).ready(function () { getCartData(); var current_store = ‘us’; var current_active_store = ‘us’; updateCurrentStoreNode(current_store); console.log(‘c_s1’, current_store); // if (current_store == ‘eu’) { // current_store = ‘de’; // } console.log(‘c_s’, current_store); jQuery(“#mobile-stores”).find(‘li[data-astore=”‘ + current_active_store + ‘”]’).addClass(‘active-store’); jQuery(‘span[data-store=”‘ + current_store + ‘”]’).addClass(‘active’); jQuery(‘span[data-store=”‘ + current_store + ‘”]’).removeClass(‘storeswap’); jQuery(document).on(“click”, “.storeswap”, function () { if (jQuery(this).hasClass(‘active’)) { return; } var is_store_change = ‘0’; var store = jQuery(this).attr(‘data-store’); var mstore = jQuery(this).attr(‘data-mstore’); var url = jQuery(this).attr(‘data-href’); if (mstore == “de”) { mstore = ‘eu’; } var is_popup = false; if (store != current_store) { var is_popup = true; if (mstore == ‘us’ && jQuery.inArray(current_store, [‘us’, ‘fashion’, ‘mart’, ‘used’]) != ‘-1’) { is_popup = false; } else if (mstore == ‘uk’ && current_store == ‘uk’) { is_popup = false; } else if (mstore == ‘ch’ && current_store == ‘ch’) { is_popup = false; } } if (is_popup) { var base_icon = ‘https://d3ulwu8fab47va.cloudfront.net/skin/frontend/default/ubuycom-v1/images/countries-flag/’; var from_icon = base_icon + “new-” + current_active_store + “-icon.png”; var to_icon = base_icon + “new-” + mstore + “-icon.png”; var url_tag = ‘ max_scroll) { jQuery(“#center-search-bar”).removeClass(“d-none”); } else if (scrollTop 0) { var input_field = ”; jQuery(“#product_addtocart_form >.no-display”).append(input_field); } } jQuery(document).on(‘click’, ‘#searchRelatedProducts’, function () { if (typeof customEvent === “function”) { var product_url = ‘https://www.ubuy.co.in/category/%D1%8D%D0%BB%D0%B5%D0%BA%D1%82%D1%80%D0%BE%D0%BD%D0%B8%D0%BA%D0%B0-172282’; var ecommerceData = {url: product_url}; customEvent(“similar_products”, ecommerceData) } }); }); ]]>
    Source