Webseite:Katzenfutter in Bangladesch im Kombi; Online Pet Shop comInhalt
MewMewShopBD|MewMewShopBD|CatAccessories&FoodinBangladesh:root{--primary:#5E2C84;--white:#fff;} .dashboard-content.card-body.order-itema:first-child{ color:white!important; }.dashboard-content.card-body.download-invoicea{ color:white!important; }(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':newDate().getTime(),event:'gtm.js'});varf=d.getElementsByTName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-5HGB77K');089OurlocationTrackYourOrderবিকাশপেমেন্টকরলেই৫%ইনস্ট্যান্টক্যাশব্যাক!!! HelloUser,AccountMyBasket(0)বিকাশপেমেন্টকরলেই৫%ইনস্ট্যান্টক্যাশব্যাক!!! CategoriesMenuHomePrivilegeClubSpecialOffersHotline089HappyMother'sDay.BigSaleUpto40%00productsBrowseMenuHomePrivilegeClubSpecialOffersOurlocationLogIn/SignUp089FollowUsBrowseCategories OurlocationLogIn/SignUp089FollowUsSharethis:Brands:Category:(0reviews)৳৳Clear1SKU:ailability:InStockquick&easyorderingprocessNowyoucanorderproductsforyourpetsfromMewMewshop.Weprovidealltheproductsyouneed.quick&easyorderingprocessNowyoucanorderproductsforyourpetsfromMewMewshop.Weprovidealltheproductsyouneed.LoginLogintomakeanorderaccessyourorders,specialoffersandmore!Number+88orEmailSendOTPHowtologinyouraccount?BycontinueingyoureetoTerms&Conditions,PrivacyPolicy&Refund-ReturnPolicy@media(max-width:575px){.verify-otp-section.edit-resend-info{width:290px!important;}}#addAfter.disabled{color:#ccc!important;opacity:0.7;}EnterOTPEntertheOTPcodewejustsentyouonyourregisteredEmail/Phonenumber.Number+88EmailVerifyOTPDidn'tgetOTP?ResendOTPAfter30SecEditProfilePleaseEdityourprofiletofinishtheprocessofauthenticaion.FirstNameLastNameEmailPhoneSubmit FeaturedCategoriesFlashSaleViewAllFeaturedBrandsSeeAllNewlyLaunchedItemsViewAllOurLatestPetBlogOurLatestPetBlogমিউমিউশপথেকেঅর্ডারকিভাবেকরবেনকিভাবেসার্চকরবেবিস্তারিতকিভাবেলগইনকরবেবিস্তারিতকিববেঅর্ডারকনফার্মকরবেবিস্তারিতডাউনলোডকরোনমিউমিউশপএ,আরআপভোগকরুনআকর্ষণীয়মূল্যছাড়।LovelyTestimonialFromHappyCustomerCatAccessories&FoodinBangladesh,GettheBestPetFood&SuppliesinBangladesh!BuyCatFood,CatLitter,DogFood,PetAccessoriesinBD.Address:House#695/1,Road#11,BaitulAmanHousingSociety,Adabor,1207Dhaka,BangladeshPhone:-Email:[email160;protected] GetToKnowUs BlogsAboutUsContactUs Policies PrivacyPolicyTerms&ConditionRefund&ReturnPolicy Let'sHelpYou FAQAllBrandsPrivilleClub Advante TrackMyOrder ©2024MewMewShopBD-AllrightsreservedPoweredby:DevzCart.CategoriesSearchMyProfileChat Items ৳0 Loading...varloadInterval;vardotCount=0;varisLocal=`live`;varenableLayer=`G-ELYLTE57VT`;varenableSEO=`1`;varbaseUrl=window.location.origin;varcurrentUrl=window.location.href;vardefaultIme="mewmewshopbd.com/img/default.png";varauthInfo="";varisMobile=``;varisCheckoutRoute=``;toastr.options={"closeButton":true,"debug":false,"newestOnTop":true,"progressBar":true,"positionClass":"toast-top-center",//Positioningthetoasteratthetopcenter"preventDuplicates":false,"onclick":null,"showDuration":"2000","hideDuration":"500","timeOut":"2000","extendedTimeOut":"2000","showEasing":"swing","hideEasing":"linear","showMethod":"fadeIn","hideMethod":"fadeOut"}//swal.fire({//title:"Warning",//html:"Youwillnotgetanypointsifyouappliedcoupon!!",//type:"error",//timer:5000//});//Swal.fire({//position:'center',//icon:'warning',//title:'Noimedatafound',//showConfirmButton:false,//timer:1000//});$(document).ready(function(){$('.slick-imes-wrapper').show();$('.slick-imes-wrapper').slick({slidesToShow:1,slidesToScroll:1,fade:true,loop:true,dots:true,arrows:false,autoplay:true,});$('.initial-slider-item').remove();});$(document).ready(function(){if(isLocal!=='local'&&baseUrl.includes('mewmewshopbd.com')){//Disableright-clickcontextmenu//document.addEventListener('contextmenu',event=>event.preventDefault());//DisableF12keydocument.addEventListener('keydown',event=>{if(event.keyCode===123){event.preventDefault();}});//DisableCtrl+Shift+Idocument.addEventListener('keydown',event=>{if(event.ctrlKey&&event.shiftKey&&event.keyCode===73){event.preventDefault();}});//DisableCtrl+Shift+Jdocument.addEventListener('keydown',event=>{if(event.ctrlKey&&event.shiftKey&&event.keyCode===74){event.preventDefault();}});//DisableCtrl+Udocument.addEventListener('keydown',event=>{if(event.ctrlKey&&event.keyCode===85){event.preventDefault();}});}});functionstartLoader(){$('.main-loader').show();constloaderContainer=document.querySelector('.loading-container');constdots=document.querySelector(".loading-dots");//MaketheloadervisibleloaderContainer.style.display="flex";//StartupdatingthedotsloadInterval=setInterval(function(){dotCount=(dotCount+1)%4;dots.textContent=".".repeat(dotCount).padEnd(3,"");},500);}functionstopLoader(){constloaderContainer=document.querySelector('.loading-container');//StopupdatingthedotsclearInterval(loadInterval);//HidetheloaderloaderContainer.style.display="none";$('.main-loader').hide();}functionbuildCategoryRoute(category){if(!category){return;}letfullRoute=category.slug;if(category.parent_categories){fullRoute=buildCategoryRoute(category.parent_categories)+'/'+category.slug;}returnfullRoute;}functioncartPopup(title,imgUrl){constcontainer=document.querySelector('.notification-container');$('.notification-container').show();//Createnotificationelementconstnotification=document.createElement('div');notification.className='notificationhidden';//Starthiddentomanetransitionnotification.innerHTML=`${title}×Thisproducthasbeenaddedtothecart.ViewCartCheckout`;//Insertthenewnotificationatthetopofthecontainercontainer.prepend(notification);//Ensuresnewnotificationsareaddedatthetop//ShownotificationwithadelaytoallowCSStransitionsetTimeout(()=>{notification.classList.remove('hidden');},100);//Setauto-hidewithcleanupsetTimeout(()=>{notification.classList.add('hidden');setTimeout(()=>{if(notification.parentNode){notification.parentNode.removeChild(notification);}},500);//Ensuresmoothfadingbeforeremoval},3000);//Closebuttonfunctionalitynotification.querySelector('.close-btn').addEventListener('click',()=>{notification.classList.add('hidden');setTimeout(()=>{if(notification.parentNode){notification.parentNode.removeChild(notification);}},500);//RemovefromDOMaftertransition});}functionhighlightedSlider(){constroute=`mewmewshopbd.com/get/get-highlighted-sliders`;axios.get(route).then(function(response){if(response.data!=null){var$bannerSlider=$('.your-class');if($bannerSlider.hasClass('slick-initialized')){$bannerSlider.slick('unslick');}$bannerSlider.empty();$.map(response.data,function(bannerSlider,key){letime;if(window.innerWidth=12&&deliveryDate.getHours()0){$.each(areas,function(key,area){options+=`${area.name}`;});}if(isRouteAddress==1){$('#customerArea,.customerArea').html(options);}elseif(fromModal=='yes'){$('.customerArea').html(options);}else{$('#customerArea').closest('.row').find('#customerArea').html(options);}}}).catch(function(error){});}}functionaddAddressForm(obj){letfirstName=$('#addFirstName').val();letcustomerMobile=$('#addMobile').val();letcustomerEmail=$('#addEmail').val();letmainAddress=$('#addAddress').val();leteditDistrict=$('#addDistrict').find(':selected').val();leteditArea=$('#addArea').find(':selected').val();leteditFilterName=/^[a-zA-Z\s]+$/;leteditFilterPhone=/^(?:\+?88|0088)?01[3-9]\d{8}$/;leteditFilterEmail=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!firstName){toastr.error('FirstNamecannotbeempty!');returnfalse;}if(!editFilterName.test(firstName)){toastr.error('FirstNameshouldcontainonlyletters!');returnfalse;}if(!customerMobile){toastr.error('Mobilecannotbeempty!');returnfalse;}if(!editFilterPhone.test(customerMobile)){toastr.error('Pleaseenteravalidmobilenumber!');returnfalse;}if(!customerEmail){toastr.error('Emailcannotbeempty!');returnfalse;}if(!editFilterEmail.test(customerEmail)){toastr.error('PleaseenteravalidEmail!');returnfalse;}if(!editDistrict){toastr.error('Districtcannotbeempty!');returnfalse;}if(!editArea){toastr.error('Zonecannotbeempty!');returnfalse;}if(!mainAddress){toastr.error('Addresscannotbeempty!');returnfalse;}$(obj).prop('disabled',true);$('.addAddressForm').submit();}functioneditAddressForm(obj){letfirstName=$('#firstname').val();letcustomerMobile=$('#customerMobile').val();letcustomerEmail=$('#customerEmail').val();letmainAddress=$('#mainAddress').val();leteditDistrict=$('#editDistrict').find(':selected').val();leteditArea=$('#editArea').find(':selected').val();leteditFilterName=/^[a-zA-Z\s]+$/;leteditFilterPhone=/^(?:\+?88|0088)?01[3-9]\d{8}$/;leteditFilterEmail=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!firstName){toastr.error('FirstNamecannotbeempty!');returnfalse;}if(!editFilterName.test(firstName)){toastr.error('FirstNameshouldcontainonlyletters!');returnfalse;}if(!customerMobile){toastr.error('Mobilecannotbeempty!');returnfalse;}if(!editFilterPhone.test(customerMobile)){toastr.error('Pleaseenteravalidmobilenumber!');returnfalse;}if(!customerEmail){toastr.error('Emailcannotbeempty!');returnfalse;}if(!editFilterEmail.test(customerEmail)){toastr.error('PleaseenteravalidEmail!');returnfalse;}if(!editDistrict){toastr.error('Districtcannotbeempty!');returnfalse;}if(!editArea){toastr.error('Zonecannotbeempty!');returnfalse;}if(!mainAddress){toastr.error('Addresscannotbeempty!');returnfalse;}$(obj).prop('disabled',true);$('.editAddressForm').submit();}functionfeaturedCategories(){constroute=`mewmewshopbd.com/get/get-featured-categories`;axios.get(route).then(function(response){if(response.data!=null){$.map(response.data,function(category,key){letime=category.featured_ime?category.featured_ime?.display_url:(category.ime?baseUrl+(category.ime.replace("./","/")):(baseUrl+'/img/default.png'));letroute=buildCategoryRoute(category);route=baseUrl+'/product-category/'+route;$('#categoriesCarousel').append(`${category.name}`);});var$featuredCategories=$('#categoriesCarousel');$featuredCategories.on('changed.owl.carouselinitialized.owl.carousel',function(event){$(event.target).find('.owl-item').removeClass('last').eq(event.item.index+event.pe.size-1).addClass('last')}).owlCarousel({loop:false,n:false,autoplay:false,autoplayTimeout:8000,items:5,margin:20,dots:false,responsiveClass:true,responsive:{0:{items:3,},576:{items:3,},768:{items:4,},992:{items:5,},}});$featuredCategories.owlCarousel().trigger('refresh.owl.carousel');}else{$('.highlighted-categories').hide();}}).catch(function(error){console.log(error)});}featuredCategories()asyncfunctiongetHighlightedOffer(){constroute=await`mewmewshopbd.com/get-highlighted-offer`;awaitaxios.get(route).then(function(response){var$highlightedOffer=$('#highlightedOffer');if($highlightedOffer.hasClass('slick-initialized')){$highlightedOffer.slick('unslick');}$highlightedOffer.empty();if(response.data!=null){$('.highlighted-offer').show();$.map(response.data,function(offer,key){letbanner_ime=offer.featured_ime?offer.featured_ime?.display_url:`mewmewshopbd.com/img/default.png`;letdate=newDate(offer.starts_at);letdate2=newDate(offer.ends_at);letmonths=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];letformattedDate=date.getDate()+''+months[date.getMonth()]+''+date.getFullYear();letformattedDate2=date2.getDate()+''+months[date2.getMonth()]+''+date2.getFullYear();$highlightedOffer.append(`${formattedDate}-${formattedDate2}${offer.name}BuyOfferProducts&GetGift!ViewDetails`);});//Reinitializetheslickslider$highlightedOffer.slick({slidesToShow:3,slidesToScroll:1,fade:false,infinite:true,//Makesure'loop'issetcorrectlyas'infinite'dots:false,arrows:false,autoplay:true,autoplaySpeed:2000,//UseautoplaySpeedinsteadofautoplayTimeoutmargin:20,responsive:[{breakpoint:576,settings:{slidesToShow:1,slidesToScroll:1,margin:2,}},{breakpoint:768,settings:{slidesToShow:2,slidesToScroll:1,}},{breakpoint:992,settings:{slidesToShow:3,slidesToScroll:1,}}]});}}).catch(function(error){console.log(error);});}getHighlightedOffer()asyncfunctiongetOfferProducts(){constroute=`mewmewshopbd.com/get/get-offer-products`;awaitaxios.get(route).then(function(response){if(response.data!=null){$('.clearence-sale').show();letofferProductsHtml='';var$offerProductSlider=$('.offer-product-slider');if($offerProductSlider.hasClass('slick-initialized')){$offerProductSlider.slick('unslick');}$offerProductSlider.empty();$.map(response.data,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variation!=null?'৳'+(parseFloat(product.variation.sell_price_inc_tax)).toFixed(1):'';if(product.discount_variation){price='৳'+(parseFloat(product.discount_variation.unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variation.sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variation){if(product.type=='variable'){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0&&product.enable_stock==1){offerBadge=`${product.discount_variation.discount_type==1?'-'+Math.round((product.discount_variation)?.discount_amount)+'%':'-৳'+Math.round((product.discount_variation)?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i=568&&banner.large_ime!=null?banner.large_ime?.display_url:banner.small_ime?.display_url;bannerHtml1+=``;});if(bannerHtml1){let$bannerSection1=$('#bannerSection1');letitemLength=Object.keys(response.data.bannerSection1).length>=4?4:Object.keys(response.data.bannerSection1).length;$bannerSection1.append(bannerHtml1);$bannerSection1.on('changed.owl.carouselinitialized.owl.carousel',function(event){$(event.target).find('.owl-item').removeClass('last').eq(event.item.index+event.pe.size-1).addClass('last')}).owlCarousel({loop:false,n:false,autoplay:false,items:itemLength,margin:20,dots:false,responsiveClass:true,responsive:{0:{items:1,margin:2,},576:{items:1,},768:{items:itemLength,},992:{items:itemLength,},}});$bannerSection1.owlCarousel().trigger('refresh.owl.carousel');}//---------BANNERPLACEMENTNO2---------//$.map(response.data.bannerSection2,function(banner,key){letime=window.innerWidth>=568&&banner.large_ime!=null?banner.large_ime?.display_url:banner.small_ime?.display_url;bannerHtml2+=``;});if(bannerHtml2){let$bannerSection2=$('#bannerSection2');letitemLength=Object.keys(response.data.bannerSection2).length>=4?4:Object.keys(response.data.bannerSection2).length;$bannerSection2.append(bannerHtml2);$bannerSection2.on('changed.owl.carouselinitialized.owl.carousel',function(event){$(event.target).find('.owl-item').removeClass('last').eq(event.item.index+event.pe.size-1).addClass('last')}).owlCarousel({loop:false,n:false,autoplay:false,items:itemLength,margin:20,dots:false,responsiveClass:true,responsive:{0:{items:1,margin:2,},576:{items:1,},768:{items:itemLength,},992:{items:itemLength,},}});$bannerSection2.owlCarousel().trigger('refresh.owl.carousel');}//---------BANNERPLACEMENTNO3---------//$.map(response.data.bannerSection3,function(banner,key){letime=window.innerWidth>=568&&banner.large_ime!=null?banner.large_ime?.display_url:banner.small_ime?.display_url;bannerHtml3+=``;});if(bannerHtml3){let$bannerSection3=$('#bannerSection3');letitemLength=Object.keys(response.data.bannerSection3).length>=4?4:Object.keys(response.data.bannerSection3).length;$bannerSection3.append(bannerHtml3);$bannerSection3.on('changed.owl.carouselinitialized.owl.carousel',function(event){$(event.target).find('.owl-item').removeClass('last').eq(event.item.index+event.pe.size-1).addClass('last')}).owlCarousel({loop:false,n:false,autoplay:false,items:itemLength,margin:20,dots:false,responsiveClass:true,responsive:{0:{items:1,margin:2,},576:{items:1,},768:{items:itemLength,},992:{items:itemLength,},}});$bannerSection3.owlCarousel().trigger('refresh.owl.carousel');}}).catch(function(error){console.log(error)});}appendBanners()asyncfunctiongetBrandTabProducts(){constroute=await`mewmewshopbd.com/get-brand-tab-products`;awaitaxios.get(route).then(function(response){vardata=response.data;vardataLength=response.data.brand.length;if(data!=null){//--------------BRANDONE-------------//if(dataLength>0){$('.brand-tabs').show();$('#brandOneBtn').show();$('#brandOneBtnbutton').text(data.brand[0].name);letitemOneProducts=data.brandOneProducts;$.map(itemOneProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------BRANDTWO--------------//if(dataLength>1){$('#brandTwoBtn').show();$('#brandTwoBtnbutton').text(data.brand[1].name);letitemTwoProducts=data.brandTwoProducts;$.map(itemTwoProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CBRANDTHREE-------------//if(dataLength>2){$('#brandThreeBtn').show();$('#brandThreeBtnbutton').text(data.brand[2].name);letitemThreeProducts=data.brandThreeProducts;$.map(itemThreeProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------BRANDONE-------------//if(dataLength>3){$('#brandFourBtn').show();$('#brandFourBtnbutton').text(data.brand[3].name);letitemFourProducts=data.brandFourProducts;$.map(itemFourProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------BRANDTWO--------------//if(dataLength>4){$('#brandFiveBtn').show();$('#brandFiveBtnbutton').text(data.brand[4].name);letitemFiveProducts=data.brandFiveProducts;$.map(itemFiveProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CBRANDTHREE-------------//if(dataLength>5){$('#brandSixBtn').show();$('#brandSixBtnbutton').text(data.brand[5].name);letitemSixProducts=data.brandSixProducts;$.map(itemSixProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CBRANDTHREE-------------//if(dataLength>6){$('#brandSevenBtn').show();$('#brandSevenBtnbutton').text(data.brand[6].name);letitemSevenProducts=data.brandSevenProducts;$.map(itemSevenProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}}}).catch(function(error){console.log(error)});}getBrandTabProducts()asyncfunctiongetHighlightedCategoryWithProducts(){constroute=await`mewmewshopbd.com/get-highlighted-category-with-products`;awaitaxios.get(route).then(function(response){vardata=response.data;varcategoryLength=response.data.category.length;if(data!=null){$('.category-tabs').show();//--------------CATEGORYONE-------------//if(categoryLength>0){$('#categoryOneBtnbutton').text(data.category[0].name);letcatOneProducts=data.categoryOneProducts;$.map(catOneProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------CATEGORYTWO--------------//if(categoryLength>1){$('#categoryTwoBtnbutton').text(data.category[1].name);letcatTwoProducts=data.categoryTwoProducts;$.map(catTwoProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CATEGORYTHREE-------------//if(categoryLength>2){$('#categoryThreeBtnbutton').text(data.category[2].name);letcatThreeProducts=data.categoryThreeProducts;$.map(catThreeProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------CATEGORYONE-------------//if(categoryLength>3){$('#categoryFourBtnbutton').text(data.category[3].name);letcatFourProducts=data.categoryFourProducts;$.map(catFourProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//--------------CATEGORYTWO--------------//if(categoryLength>4){$('#categoryFiveBtnbutton').text(data.category[4].name);letcatFiveProducts=data.categoryFiveProducts;$.map(catFiveProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CATEGORYTHREE-------------//if(categoryLength>5){$('#categorySixBtnbutton').text(data.category[5].name);letcatSixProducts=data.categorySixProducts;$.map(catSixProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}//-------------CATEGORYTHREE-------------//if(categoryLength>6){$('#categorySevenBtnbutton').text(data.category[6].name);letcatSevenProducts=data.categorySevenProducts;$.map(catSevenProducts,function(product,key){letthumbnail_ime=product.featured_ime!=null&&product.featured_ime!=''?product.featured_ime?.display_url:defaultImeletoldPrice=null;letprice=product.variations!=null?'৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1):'';letdiscountVariation=product.discount_variations.length;if(discountVariation>0){price='৳'+(parseFloat(product.discount_variations[0].unit_price_after_disc)).toFixed(1);oldPrice='৳'+(parseFloat(product.variations[0].sell_price_inc_tax)).toFixed(1);}else{$('.hide-discount'+product.id).hide()}letofferBadge='';if(product.discount_variations.length>0){if(product.type=='variable'){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.enable_stock!=1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}elseif(product.total_stock>0&&product.enable_stock==1){offerBadge=`${product.discount_variations[0].discount_type==1?'-'+Math.round((product.discount_variations[0])?.discount_amount)+'%':'-৳'+Math.round((product.discount_variations[0])?.discount_amount)}`;}else{offerBadge=`StockOut`;}}else{if(product.type!='variable'&&product.total_stock0){cartBtn=``;}else{cartBtn=``;}}else{cartBtn=``;}}letfillWishlist=authInfo&&product.wishlist?'#ff1493':'var(--primary)';letonclickWishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;letproductRating='';for(leti=1;i0?product.discount_variations[0].discount_type==1?'-'+Math.round(product.discount_variations[0].discount_amount)+'%':'-৳'+Math.round(product.discount_variations[0].discount_amount):''}${offerBadge}${product.category.name}${product.name}${productRating}${price}${oldPrice!=null?oldPrice:''}${cartBtn}`);});}}}).catch(function(error){console.log(error)});}getHighlightedCategoryWithProducts()asyncfunctionhomeBlogs(){constroute=`mewmewshopbd.com/get-home-blogs`;awaitaxios.get(route).then(function(response){if(response.data!=null){letsliderBlog='';$('.blog-s-title').show();$.map(response.data.data,function(blog,key){letroute="mewmewshopbd.com/blog/blog-slug";route=route.replace('blog-slug',blog.slug);if(window.innerWidth0){addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}else{outOfStock+=`OutOfStock`;if(authInfo!=null&&stock_Request!=null&&stock_Request.variation_id==variationInfo.id){stockRequested+=`StockRequested`;}else{stockRequest+=`StockRequest`;}stockailibility+=`ailability:OutOfStock`;}}else{addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}if(quickView=='No'){$('.d-cart-actions,.footer-button').html('');$('.stock-ailibility').html('');$('.d-cart-actions,.footer-button').append(addToCart);$('.d-cart-actions,.footer-button').append(buyNow);$('.d-cart-actions,.footer-button').append(outOfStock);$('.d-cart-actions,.footer-button').append(stockRequest);$('.d-cart-actions,.footer-button').append(stockRequested);$('.stock-ailibility').append(stockailibility);}else{$('.q-add-to-cart').html('');$('.stockailibility').html('');$('.q-add-to-cart').append(addToCart);$('.q-add-to-cart').append(buyNow);$('.q-add-to-cart').append(outOfStock);$('.q-add-to-cart').append(stockRequest);$('.q-add-to-cart').append(stockRequested);$('.stockailibility').append(stockailibility);}}).catch(function(error){console.log(error)});}}functionselectAtrributes(obj,type,quickView){letkeyword='q';if(quickView=='No'){keyword='d';}if(type=='Color'){document.querySelectorAll('.'+keyword+'-changable-color').forEach(li=>{li.classList.remove('active');});obj.closest('li').classList.add('active');}elseif(type=='Size'){document.querySelectorAll('.'+keyword+'-changable-size').forEach(li=>{li.classList.remove('active');});obj.closest('li').classList.add('active');}else{document.querySelectorAll('.'+keyword+'-changable-e').forEach(li=>{li.classList.remove('active');});obj.closest('li').classList.add('active');}}functiongetVariationData(obj,type,variationValue,quickView){//selectAtrributes(obj,type,quickView)lettotalAddedVariation=0;letcombinedVariationData='';if(quickView=='No'){if(!variationData.hasOwnProperty(type)){variationData[type]=[];}variationData[type]=[variationValue];letjoinVariationValue=variationData[type].join(',');for(lettinvariationData){if(variationData.hasOwnProperty(t)){totalAddedVariation++;}}combinedVariationData=Object.values(variationData).flat().join(',');}else{if(!variationData2.hasOwnProperty(type)){variationData2[type]=[];}variationData2[type]=[variationValue];letjoinVariationValue=variationData2[type].join(',');for(lettinvariationData2){if(variationData2.hasOwnProperty(t)){totalAddedVariation++;}}combinedVariationData=Object.values(variationData2).flat().join(',');}//AXIOSREQEUSTSTART$('.button-add-to-cart').prop('disabled',true);letproductId=quickView=='No'?$('.product_id').val():$('.productId').val();lettotalVariation=quickView=='No'?$('.total_variation').val():$('.totalVariation').val();constroute=`mewmewshopbd.com/get-product-variation-info`;if(totalAddedVariation==totalVariation){axios.get(route,{params:{type:type,product_id:productId,variation_template_value:combinedVariationData,quick_view:quickView,}}).then(function(response){//letvariImgsView=response.data.data.imeView;letvariationImgs=response.data.data.imes;letvariationInfo=response.data.data.variation;letproduct=variationInfo?variationInfo.product:'';letstock_Request=response.data.data.stock_request;letfile_exist=response.data.data.file_existletproductIme=product.feature_ime?.display_url;if(variationInfo==null){//toastr.options={//"closeButton":true,//"debug":false,//"newestOnTop":true,//"progressBar":true,//"positionClass":"toast-top-center",//Positioningthetoasteratthetopcenter//"preventDuplicates":false,//"onclick":null,//"showDuration":"2000",//"hideDuration":"500",//"timeOut":"2000",//Showerrorfor2seconds//"extendedTimeOut":"2000",//"showEasing":"swing",//"hideEasing":"linear",//"showMethod":"fadeIn",//"hideMethod":"fadeOut"//}//toastr.warning('NoVariationCombinationFoundFor'+response.data.data.variationNamesString);clearVariations(quickView,productId,'no');return;}if(quickView=='No'){if(variationImgs.length0){addToCart+=`Addtocart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}else{outOfStock+=`OutOfStock`;if(authInfo!=null&&stock_Request!=null&&stock_Request.variation_id==variationInfo.id){stockRequested+=`StockRequested`;}else{if(quickView=='No'){stockRequest+=`StockRequest`;}else{stockRequest+=`StockRequest`;}}$('#disablePlusQty').val(1);stockailibility+=`ailability:OutOfStock`;}}else{addToCart+=`Addtocart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}if($('#disablePlusQty').val()==0){$('.product-quantity').removeClass('invisible').fadeIn();}else{$('.product-quantity').addClass('invisible').fadeOut();}if(quickView=='No'){$('.d-cart-actions,.footer-button').html('');$('.stock-ailibility').html('');$('.d-cart-actions,.footer-button').append(addToCart);$('.d-cart-actions,.footer-button').append(buyNow);$('.d-cart-actions,.footer-button').append(outOfStock);$('.d-cart-actions,.footer-button').append(stockRequest);$('.d-cart-actions,.footer-button').append(stockRequested);$('.stock-ailibility').append(stockailibility);}else{$('.q-add-to-cart').html('');$('.stockailibility').html('');$('.q-add-to-cart').append(addToCart);$('.q-add-to-cart').append(buyNow);$('.q-add-to-cart').append(outOfStock);$('.q-add-to-cart').append(stockRequest);$('.q-add-to-cart').append(stockRequested);$('.stockailibility').append(stockailibility);}}).catch(function(error){console.log(error)});}}functiongetVariationDat2(obj,type,variationValue,quickView)//ONLOADALLVARIATIONIME{if(!variationData.hasOwnProperty(type)){variationData[type]=[];}variationData[type]=[variationValue];letjoinVariationValue=variationData[type].join(',');lettotalAddedVariation=0;for(lettinvariationData){if(variationData.hasOwnProperty(t)){totalAddedVariation++;}}letcombinedVariationData=Object.values(variationData).flat().join(',');$('.button-add-to-cart').prop('disabled',true);letproductId=quickView=='No'?$('.product_id').val():$('.productId').val();lettotalVariation=quickView=='No'?$('.total_variation').val():$('.totalVariation').val();constroute=`mewmewshopbd.com/get-product-variation-info`;if(totalAddedVariation==totalVariation){axios.get(route,{params:{type:type,product_id:productId,variation_template_value:combinedVariationData}}).then(function(response){letvariationImgs=response.data.data.imes;letvariationInfo=response.data.data.variation;letproduct=variationInfo.product;letfile_exist=response.data.data.file_existletstock_Request=response.data.data.stock_request;letproductIme=baseUrl+'/uploads/img/'+product.ime;if(quickView=='No'){if(variationImgs&&variationImgs.file_name){constimeSpans=document.querySelectorAll('.exzoom_n_innerspan');//---------FORACTIVETHEPRODUCTTHUMBNAILS-----------//constImgSrcPart=(variationImgs.file_name).split('_');//SplitstheimenamebyunderscoreconsttargetSrc=ImgSrcPart[0]+'_'+ImgSrcPart[1]+'_';//CombinesthefirsttwopartsletmatchedIndex='';imeSpans.forEach((span,index)=>{constimg=span.querySelector('img');constimgSrc=img.src.split('/').pop();//ExtractstheimenamefromthesrcconstimgSrcParts=imgSrc.split('_');//SplitstheimenamebyunderscoreconstimgSrcMatchPart=imgSrcParts[0]+'_'+imgSrcParts[1]+'_';//Combinesthefirsttwopartsif(imgSrcMatchPart===targetSrc){span.classList.add('current');matchedIndex=index;}else{span.classList.remove('current');}});//---------END-----------//letpixel=isMobile?Number(matchedIndex)*280:Number(matchedIndex)*350;letplusMinus='-';$('.exzoom_img_ul').css({'left':plusMinus+pixel+'px'});$('.exzoom_preview_img').attr('src',variationImgs.display_url);}$('.changable-sku').text(variationInfo.sub_sku);$('.variation_id').val(variationInfo.id);$('.d-input-box').val(variationInfo.cart!=null?variationInfo.cart?.quantity:1);if(variationInfo.discount_variation!=null){$('.changable-price').text(Math.round(variationInfo.discount_variation.unit_price_after_disc));$('.old-price').show();$('.offer-price').text('');$('.offer-price').text(Math.round(variationInfo.sell_price_inc_tax));}else{$('.old-price').hide();$('.changable-price').text(Math.round(variationInfo.sell_price_inc_tax));}}else{$('.q-sku').text(variationInfo.sub_sku);$('.variationId').val(variationInfo.id);if(variationInfo.discount_variation!=null){$('.q-price').text(Math.round(variationInfo.discount_variation.unit_price_after_disc));$('.q-old-price,.q-offer').show();$('.q-offer-price,.q-offer.hot').text('');$('.q-offer-price').text(Math.round(variationInfo.sell_price_inc_tax));if(variationInfo.discount_variation.discount_type==1){$('.q-offer.hot').text('-'+Math.round(variationInfo.discount_variation?.discount_amount)+'%');}else{$('.q-offer.hot').text('-৳'+Math.round(variationInfo.discount_variation?.discount_amount));}}else{$('.q-old-price,.q-offer').hide();$('.q-price').text(Math.round(variationInfo.sell_price_inc_tax));}}$('.button-add-to-cart').prop('disabled',false);if(quickView!='No'&&file_exist=='yes'){$('.q-ime').attr('src',variationImgs.display_url!=null?variationImgs.display_url:defaultIme);}elseif(quickView!='No'&&file_exist=='no'){$('.q-ime').attr('src',product.ime!=null?productIme:defaultIme);}letbuyNow='';letaddToCart='';letoutOfStock='';letstockRequest='';letheVariation=1;letstockRequested='';letstockailibility='';if(product.enable_stock==1){if(variationInfo!=null&&variationInfo.total_stock>0){addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}else{outOfStock+=`OutOfStock`;if(authInfo!=null&&stock_Request!=null&&stock_Request.variation_id==variationInfo.id){stockRequested+=`StockRequested`;}else{stockRequest+=`StockRequest`;}stockailibility+=`ailability:OutOfStock`;}}else{addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}if(quickView=='No'){$('.d-cart-actions,.footer-button').html('');$('.stock-ailibility').html('');$('.d-cart-actions,.footer-button').append(addToCart);$('.d-cart-actions,.footer-button').append(buyNow);$('.d-cart-actions,.footer-button').append(outOfStock);$('.d-cart-actions,.footer-button').append(stockRequest);$('.d-cart-actions,.footer-button').append(stockRequested);$('.stock-ailibility').append(stockailibility);}else{$('.q-add-to-cart').html('');$('.stockailibility').html('');$('.q-add-to-cart').append(addToCart);$('.q-add-to-cart').append(buyNow);$('.q-add-to-cart').append(outOfStock);$('.q-add-to-cart').append(stockRequest);$('.q-add-to-cart').append(stockRequested);$('.stockailibility').append(stockailibility);}}).catch(function(error){console.log(error)});}}functionclearVariations(quickView,currentProductId=null,showToastr=null){if(quickView=='No'){variationData={};letcolorItems=document.querySelectorAll('.d-changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){item.classList.remove('active')}});letsizeItems=document.querySelectorAll('.d-changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){item2.classList.remove('active')}});leteItems=document.querySelectorAll('.d-changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){item3.classList.remove('active')}});letoldImgs=$('#oldImgs').val();if(oldImgs0){$('.changable-price').text(Math.round(oldPrices));$('.old-price,.d-offer').show();$('.offer-price,.d-offer.hot').text('');$('.offer-price').text(Math.round(oldOffers));if(oldDiscountType==1){$('.d-offer.hot').text('-'+Math.round(oldAmount)+'%');}else{$('.d-offer.hot').text('-৳'+Math.round(oldAmount));}}else{$('.old-price,.d-offer').hide();$('.changable-price').text(Math.round(oldPrices));}$('.clear-variation.in-detail').hide();}else{variationData2={};letcolorItems=document.querySelectorAll('.q-changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){item.classList.remove('active')}});letsizeItems=document.querySelectorAll('.q-changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){item2.classList.remKatzenfutter in Bangladesch im Kombi; Online Pet Shop comove('active')}});leteItems=document.querySelectorAll('.q-changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){item3.classList.remove('active')}});letpreviousImg=$('#previousImg').val();letqPreviousSKU=$('#qPreviousSKU').val();$('.q-sku').text(qPreviousSKU);$('.variationId').val('');letqOldOffers=$('#qOldOffers').val();letqOldPrices=$('#qOldPrices').val();letpreviousDiscount=$('#previousDiscount').val();if(qOldOffers!=null&&qOldOffers>0){$('.q-price').text(Math.round(qOldPrices));$('.q-old-price,.q-offer').show();$('.q-offer-price,.q-offer.hot').text('');$('.q-offer-price').text(Math.round(qOldOffers));if(previousDiscount){$('.q-offer.hot').text(previousDiscount);}}else{$('.q-old-price,.q-offer').hide();$('.q-price').text(Math.round(qOldPrices));}$('.stockailibility').html('');$('.q-add-to-cart').html('');$('.q-add-to-cart').append(`AddToCartBuyNow`);$('.q-ime').attr('src',previousImg);$('.clear-variation.has-variant').hide();}if(showToastr!='no'){toastr.info('Cleared!');}}functionclearVariationsOriginal(obj,quickView){variationData={};varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){item.classList.remove('active')}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){item2.classList.remove('active')}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){item3.classList.remove('active')}});if(quickView=='No'){$('.d-cart-actions').empty();$('.d-cart-actions').append(`AddToCartBuyNow`);$('.exzoom_img_ul').css({'left':'0px'});letprodIme=$('#prodIme').val();letpreviousSKU=$('#previousSKU').val();$('.exzoom_preview_img').attr('src',prodIme);$('.variation_id').val('');$('.d-input-box').val(1);$('.changable-sku').text(previousSKU);letoldOffers=$('#oldOffers').val();letoldPrices=$('#oldPrices').val();if(oldOffers!=null&&oldOffers>0){$('.changable-price').text(Math.round(oldPrices));$('.old-price').show();$('.offer-price').text('');$('.offer-price').text(Math.round(oldOffers));}else{$('.old-price').hide();$('.changable-price').text(Math.round(oldPrices));}}else{letpreviousImg=$('#previousImg').val();letqPreviousSKU=$('#qPreviousSKU').val();$('.q-sku').text(qPreviousSKU);$('.variationId').val('');letqOldOffers=$('#qOldOffers').val();letqOldPrices=$('#qOldPrices').val();letpreviousDiscount=$('#previousDiscount').val();if(qOldOffers!=null&&qOldOffers>0){$('.q-price').text(Math.round(qOldPrices));$('.q-old-price,.q-offer').show();$('.q-offer-price,.q-offer.hot').text('');$('.q-offer-price').text(Math.round(qOldOffers));if(previousDiscount){$('.q-offer.hot').text(previousDiscount);}}else{$('.q-old-price,.q-offer').hide();$('.q-price').text(Math.round(qOldPrices));}$('.stockailibility').html('');$('.q-add-to-cart').html('');$('.q-add-to-cart').append(`AddToCartBuyNow`);$('.q-ime').attr('src',previousImg);}toastr.info('Cleared!');}functionclosequicview(){$('.zoomContainer').hide();variationData={};varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){item.classList.remove('active')}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){item2.classList.remove('active')}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){item3.classList.remove('active')}});letpreviousImg=$('#previousImg').val();letqPreviousSKU=$('#qPreviousSKU').val();$('.q-sku').text(qPreviousSKU);$('.variationId').val('');letqOldOffers=$('#qOldOffers').val();letqOldPrices=$('#qOldPrices').val();letpreviousDiscount=$('#previousDiscount').val();if(qOldOffers!=null&&qOldOffers>0){$('.q-price').text(Math.round(qOldPrices));$('.q-old-price,.q-offer').show();$('.q-offer-price,.q-offer.hot').text('');$('.q-offer-price').text(Math.round(qOldOffers));if(previousDiscount){$('.q-offer.hot').text(previousDiscount);}}else{$('.q-old-price,.q-offer').hide();$('.q-price').text(Math.round(qOldPrices));}$('.stockailibility').html('');$('.q-add-to-cart').html('');$('.q-add-to-cart').append(`AddToCartBuyNow`);$('.q-ime').attr('src',previousImg);}functionchooseVariationFirst(){toastr.warning('Choosevariationfirst!');}functioncollapseSidebar(){$('.sidebar-body').toggleClass('collapse');refreshAllCarousels()}functionrefreshAllCarousels(){$('.your-class,#highlightedOffer').slick('slickNext');}varenable_meilisearch=`1`;$('.auto-complete-input').on('keyup',function(){letsearch=$(this).val();if(search.length0){price=parseFloat(product.discount_variations[0].unit_price_after_disc).toFixed(1);oldPrice=parseFloat(product.variation.sell_price_inc_tax).toFixed(1);}autoCompleteList+=`${product.name}${price}BDT${oldPrice}BDT-SKU:${product.sku?product.sku:'N/A'}`});}}$('#autoCompleteList').html(autoCompleteList);$('#autoCompleteListInMobile').html(autoCompleteList);}).catch(function(error){console.log(error);});})functiongetSuggestion(){constroute=baseUrl+"/get/get-suggestion";axios.get(route).then(function(response){letsuggesstionList='';if(response.data!=null){$.each(response.data,function(key,suggestion){suggesstionList+=`${suggestion.name}`});}$('.t-suggession-body').html(suggesstionList);}).catch(function(error){console.log(error);});}$(document).mouseup(function(e){varcontainer=$(".auto-complete-div");if(!container.is(e.target)&&container.has(e.target).length===0){container.hide();}});varisCartlist=`0`;varisCheckout=`0`;varisOrders=`0`;functionstockRequest(obj,product_id,heVariation,quickView=null){letisLoggedIn=authInfo;if(!isLoggedIn){openLogin();return;}letisVariationSelected=0;varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){isVariationSelected=1;return;}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){isVariationSelected=1;return;}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){isVariationSelected=1;return;}});if(heVariation==1&&isVariationSelected==0&&isOrders==0){toastr.warning('Selectvariationfirst!');returnfalse;}letvariation_id=quickView=='yes'?$(document).find('.variationId').val():$(document).find('.variation_id').val();if(variation_id==''||variation_id==undefined){variation_id=$(obj).closest('li').find('.pro_variation_id').val();}if(variation_id){constroute=`mewmewshopbd.com/get/store-stock-request`;axios.post(route,{product_id:product_id,variation_id:variation_id}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);setTimeout(()=>{//window.location.reload();},1000);}elseif(response.data.status==2){toastr.info(response.data.messe);}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}}functionaddToCartDetail(id,heVariation=null,fromQuickView=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!quantity){quantity=$(document).find('.d-input-box').val();}if(!quantity){quantity=1;}if(!isLoggedIn){openLogin();return;}letisVariationSelected=0;varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){isVariationSelected=1;return;}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){isVariationSelected=1;return;}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){isVariationSelected=1;return;}});if(heVariation==1&&isVariationSelected==0){toastr.warning('Selectvariationfirst!');returnfalse;}letvariation_id=fromQuickView=='No'?$(document).find('.variation_id').val():$(document).find('.variationId').val();constroute=`mewmewshopbd.com/add-to-cart`;$.ajax({type:'POST',url:route,data:{_token:'fAkIziIvm11ME0nbmNBGChSDM25ERFnHguwx6be2',id:id,variation_id:Number(variation_id),quantity:Number(quantity)},success:function(response){if(response.status==21){window.location.reload();}if(response.status==1){toastr.success(response.messe);$('.notification-container').hide();cartPopup(response.name,response.ime);updateCartQty()appendCartItem('added',response.ime,response.name,response.type,response.data,response.discount,response.p_variation_name,response.category,response.slug,response.quantity);if(enableLayer){letdiscount=response.data?.discount;letvariation=response.data?.data;gDataLayer('add_to_cart',(response.data.quantity)*(variation.sell_price_inc_tax),response.data.sku,response.data.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data.brand,response.data.category,variation.sell_price_inc_tax,response.data.quantity,variation.name!='DUMMY'?variation.name:'','');}}elseif(response.status==2){toastr.info(response.messe);appendCartItem('increased',response.ime,response.name,response.type,response.data,response.discount,response.p_variation_name,response.category,response.slug,response.quantity);}else{toastr.error(response.messe);returnfalse;}},error:function(){console.log(err);}});}functionaddToCartDetailOld(id,heVariation=null,fromQuickView=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!quantity){quantity=$(document).find('.d-input-box').val();}if(!quantity){quantity=1;}if(!isLoggedIn){openLogin();return;}letisVariationSelected=0;varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){isVariationSelected=1;return;}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){isVariationSelected=1;return;}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){isVariationSelected=1;return;}});if(heVariation==1&&isVariationSelected==0){toastr.warning('Selectvariationfirst!');returnfalse;}letvariation_id=fromQuickView=='No'?$(document).find('.variation_id').val():$(document).find('.variationId').val();constroute=`mewmewshopbd.com/add-to-cart`;axios.post(route,{id:id,variation_id:Number(variation_id),quantity:Number(quantity)}).then(function(response){if(response.data.status==21){window.location.reload();}if(response.data.status==1){toastr.success(response.data.messe);$('.notification-container').hide();cartPopup(response.data.name,response.data.ime);updateCartQty()appendCartItem('added',response.data.ime,response.data.name,response.data.type,response.data.data,response.data.discount,response.data.p_variation_name,response.data.category,response.data.slug,response.data.quantity);}elseif(response.data.status==2){toastr.info(response.data.messe);appendCartItem('increased',response.data.ime,response.data.name,response.data.type,response.data.data,response.data.discount,response.data.p_variation_name,response.data.category,response.data.slug,response.data.quantity);}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionbuyNow(id,heVariation=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!isLoggedIn){openLogin();return;//window.location.href="mewmewshopbd.com/user/login";}letisVariationSelected=0;varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){isVariationSelected=1;return;}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){isVariationSelected=1;return;}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){isVariationSelected=1;return;}});if(heVariation==1&&isVariationSelected==0){toastr.warning('Selectvariationfirst!');returnfalse;}letvariation_id=$(document).find('.variation_id').val()!=null?$(document).find('.variation_id').val():$(document).find('.variationId').val();constroute=`mewmewshopbd.com/add-to-cart`;$.ajax({type:'POST',url:route,data:{_token:'fAkIziIvm11ME0nbmNBGChSDM25ERFnHguwx6be2',id:id,variation_id:variation_id,quantity:Number(quantity),direct_checkout:'yes'},success:function(response){if(response.status==21){window.location.reload();}if(response.status==1){toastr.success(response.messe);if(enableLayer){letdiscount=response.data?.discount;letvariation=response.data?.data;gDataLayer('add_to_cart',(response.data.quantity)*(variation.sell_price_inc_tax),response.data.sku,response.data.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data.brand,response.data.category,variation.sell_price_inc_tax,response.data.quantity,variation.name!='DUMMY'?variation.name:'','');}window.location.replace(baseUrl+'/checkout');}elseif(response.status==2){toastr.info(response.messe);window.location.replace(baseUrl+'/checkout');}else{toastr.error(response.messe);returnfalse;}},error:function(){console.log(err);}});}functionbuyNowOld(id,heVariation=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!isLoggedIn){openLogin();return;//window.location.href="mewmewshopbd.com/user/login";}letisVariationSelected=0;varcolorItems=document.querySelectorAll('.changable-color');colorItems.forEach(function(item){if(item.classList.contains('active')){isVariationSelected=1;return;}});varsizeItems=document.querySelectorAll('.changable-size');sizeItems.forEach(function(item2){if(item2.classList.contains('active')){isVariationSelected=1;return;}});vareItems=document.querySelectorAll('.changable-e');eItems.forEach(function(item3){if(item3.classList.contains('active')){isVariationSelected=1;return;}});if(heVariation==1&&isVariationSelected==0){toastr.warning('Selectvariationfirst!');returnfalse;}letvariation_id=$(document).find('.variation_id').val()!=null?$(document).find('.variation_id').val():$(document).find('.variationId').val();constroute=`mewmewshopbd.com/add-to-cart`;axios.post(route,{id:id,variation_id:variation_id,quantity:Number(quantity),direct_checkout:'yes'}).then(function(response){if(response.data.status==21){window.location.reload();}if(response.data.status==1){toastr.success(response.data.messe);window.location.replace(baseUrl+'/checkout');}elseif(response.data.status==2){toastr.info(response.data.messe);window.location.replace(baseUrl+'/checkout');}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionaddToCartOld(id,variationId=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!quantity){quantity=1;}if(!isLoggedIn){openLogin();return;}constroute=`mewmewshopbd.com/add-to-cart`;axios.post(route,{id:id,"_token":"fAkIziIvm11ME0nbmNBGChSDM25ERFnHguwx6be2",variation_id:variationId,quantity:Number(quantity)}).then(function(response){if(response.data.status==21){window.location.reload();}if(response.data.status==1){toastr.success(response.data.messe);$('.notification-container').hide();cartPopup(response.data.name,response.data.ime);updateCartQty()appendCartItem('added',response.data.ime,response.data.name,response.data.type,response.data.data,response.data.discount,response.data.p_variation_name,response.data.category,response.data.slug,response.data.quantity);}elseif(response.data.status==2){toastr.info(response.data.messe);appendCartItem('increased',response.data.ime,response.data.name,response.data.type,response.data.data,response.data.discount,response.data.p_variation_name,response.data.category,response.data.slug,response.data.quantity);}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionaddToCart(id,variationId=null){letisLoggedIn=authInfo;letquantity=$(document).find('.product-cart-qty').text();if(!quantity){quantity=1;}if(!isLoggedIn){openLogin();return;}constroute=`mewmewshopbd.com/add-to-cart`;//$.ajaxSetup({//headers:{//'X-CSRF-TOKEN':$('meta[name="csrf-token"]').attr('content')//}//});$.ajax({type:'POST',url:route,data:{_token:'fAkIziIvm11ME0nbmNBGChSDM25ERFnHguwx6be2',id:id,variation_id:variationId,quantity:Number(quantity)},success:function(response){if(response.status==21){window.location.reload();}if(response.status==1){toastr.success(response.messe);$('.notification-container').hide();cartPopup(response.name,response.ime);updateCartQty()appendCartItem('added',response.ime,response.name,response.type,response.data,response.discount,response.p_variation_name,response.category,response.slug,response.quantity);if(enableLayer){letdiscount=response.data?.discount;letvariation=response.data?.data;gDataLayer('add_to_cart',(response.data.quantity)*(variation.sell_price_inc_tax),response.data.sku,response.data.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data.brand,response.data.category,variation.sell_price_inc_tax,response.data.quantity,variation.name!='DUMMY'?variation.name:'','');}}elseif(response.status==2){toastr.info(response.messe);appendCartItem('increased',response.ime,response.name,response.type,response.data,response.discount,response.p_variation_name,response.category,response.slug,response.quantity);}else{toastr.error(response.messe);returnfalse;}},error:function(){console.log(err);}});}functionappendCartItem(appendType,ime,name,type,variation,discount,p_variation_name,category,slug,quantity=null){if(appendType=='increased'){$('.cart-item'+variation.product_id+variation.id).remove();}letroute="mewmewshopbd.com/product/slug";route=route.replace('slug',slug);letvariationName='';letproductPrice='';letdisAmount=0;letoldPrice=0;letcurrencyType=discount!=null?discount.discount_type==1?'%':'৳':'';letsellPrice=Math.round(variation.sell_price_inc_tax);if(discount!=null){productPrice=Math.round(discount.unit_price_after_disc);disAmount=Math.round(discount.discount_amount);oldPrice=Math.round(variation.sell_price_inc_tax);}else{productPrice=Math.round(variation.sell_price_inc_tax);}$('.empty-cart').empty();$('.cart-items').append(`-${discount!=null?Math.round(discount.discount_amount):0}${currencyType}${name} ${type=='variable'&&variation.name!=null?p_variation_name+','+variation.name:''}${category!=null?category:''}${quantity}xitem ৳${productPrice}৳${oldPrice} `);updateCartPrice();}functionupdateCartQty(){letcurrentTotalText=$('.total-cart-quantity1').text();letcurrentTotal=parseInt(currentTotalText.match(/\d+/)[0]);letupdatedTotal=currentTotal+1;$('.total-cart-quantity1').text(updatedTotal);$('.total-cart-quantity2').text(updatedTotal);$('.total-cart-quantity3').text(updatedTotal);}functionupdateCartPrice(){letsubtotal=0;lettotalDiscount=0;lettotalCartItem=0;$('.cart-item').each(function(){totalCartItem=1;letprice=parseFloat($(this).find('.item-sale-amount').val());letdiscountPrice=parseFloat($(this).find('.item-discount-amount').val());letquantity=parseInt($(this).find('.item-quantity').val());letitemSubtotal=price*quantity;subtotal+=itemSubtotal;totalDiscount+=discountPrice*quantity;});if(totalCartItem==0){$('.cart-items').append(``);}$('.cart-amount').text(Math.round(subtotal-totalDiscount));$('.cart-amount2').text(Math.round(subtotal-totalDiscount));$('.cart-subtotal').text(Math.round(subtotal));$('.cart-payable').text(Math.round(subtotal-totalDiscount));$('.cart-discount').text(Math.round(totalDiscount));}functionremoveCartQty(){//QUANTITYletcurrentTotalText=$('.total-cart-quantity1').text();letcurrentTotal=parseInt(currentTotalText.match(/\d+/)[0]);letupdatedTotal=currentTotal-1;$('.total-cart-quantity1').text(updatedTotal);$('.total-cart-quantity2').text(updatedTotal);$('.total-cart-quantity3').text(updatedTotal);updateCartPrice()}functionremoveFromCart(obj,id,price,qty,variation_id){constroute=`mewmewshopbd.com/remove-from-cart`;axios.post(route,{id:id,variation_id:variation_id}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);$('.cart-item'+id+variation_id).remove();removeCartQty()if(isCartlist==1){if(enableLayer){letdiscount=response.data?.discount;letvariation=response.data?.data;gDataLayer('remove_from_cart',(response.data.quantity)*(variation.sell_price_inc_tax),response.data.sku,response.data.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data.brand,response.data.category,variation.sell_price_inc_tax,response.data.quantity,variation.name!='DUMMY'?variation.name:'','');}window.location.reload();}if(isCheckout==1){//ifweareoncheckoutpethenrendercheckouttablerenderCheckoutTable();if(enableLayer){letdiscount=response.data?.discount;letvariation=response.data?.data;gDataLayer('remove_from_cart',(response.data.quantity)*(variation.sell_price_inc_tax),response.data.sku,response.data.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data.brand,response.data.category,variation.sell_price_inc_tax,response.data.quantity,variation.name!='DUMMY'?variation.name:'','');}}}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionupdateQty(obj,type,price,product_id,variation_id){letcurrentQty=$(obj).closest('.update-quantity').find('.item-quantity').val();constroute=`mewmewshopbd.com/update-cart`;axios.post(route,{type:type,product_id:product_id,variation_id:variation_id,current_qty:currentQty,}).then(function(response){if(response.data.status==1){if(currentQty==1&&type!='increase'){toastr.warning('ItemRemovedFromCart!');if(variation_id!=null){$('.cart-item'+product_id+variation_id).remove();}else{$('.cart-item'+product_id).remove();}updateCartQty()if(isCartlist==1){//calculateSubtotal();window.location.reload();}}else{if(isCartlist==1){//calculateSubtotal();window.location.reload();}toastr.info(response.data.messe);$(obj).closest('.update-quantity').find('.item-quantity').val(response.data.data.quantity);}if(type=='increase'){updateCartPrice((price),'add')}else{updateCartPrice((price),'remove')}if(isCheckout==1){//ifweareoncheckoutpethenrendercheckouttablerenderCheckoutTable()}}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionrenderCheckoutTable(){constroute=`mewmewshopbd.com/get-checkout-table-info`;axios.post(route,{remove_member_card:'yes',}).then(function(response){console.log('entered!');if(response.data.status==1){$('#checkoutTable').html('');letdata=response.data.data;if(data.view!=''){$('#checkoutTable').append(data.view);}//applyCoupon();//emptyPaymentMethod();calculateGrandTotal();emptyRpRedeem();}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functiongetLoggedIn(){letmobile=$('#mobile').val();letpassword=$('#password').val();if(!mobile){toastr.error("EnterPhoneorEmail!");returnfalse;}if(!password){toastr.error("PasswordCannotbeempty!");returnfalse;}constroute=`mewmewshopbd.com/frontend/login`;axios.post(route,{mobile:mobile,password:password}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);window.location.href="mewmewshopbd.com";}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionvalidatePhone(obj){letmobNum=$(obj).val();varfilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(filter.test(mobNum)){if(mobNum.length==11){$('#phoneError').fadeOut();}else{$('#phoneError').text('Pleaseput11digitmobilenumber!').show();}}else{$('#phoneError').text('Pleaseenteravalidmobilenumber!').show();}}functionisPhoneExist(obj,type){$('#heAnyError').val(1);letmobNum=$(obj).val();varfilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(mobNum.length>0){if(filter.test(mobNum)){if(mobNum.length==11){$('#phoneError').fadeOut();constroute=`mewmewshopbd.com/check-phone-exist-or-not`;axios.post(route,{mobile:mobNum}).then(function(response){letstatus=type=='reset'?0:1;if(response.data.status==status){$('#phoneError').fadeOut();$('#heAnyError').val(0);}else{$('#phoneError').text(response.data.messe).show();$('#heAnyError').val(1);}}).catch(function(error){$('#heAnyError').val(1);console.log(error);});}else{$('#phoneError').text('Pleaseput11digitmobilenumber!').show();$('#heAnyError').val(1);}}else{$('#phoneError').text('Pleaseenteravalidmobilenumber!').show();$('#heAnyError').val(1);}}else{$('#phoneError').fadeOut();$('#heAnyError').val(0);}}functionisEmailExist(obj,type){$('#heAnyError').val(1);letemail=$(obj).val();varfilter=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(email.length>0){if(filter.test(email)){$('#emailError').fadeOut();constroute=`mewmewshopbd.com/check-email-exist-or-not`;axios.post(route,{email:email}).then(function(response){letstatus=type=='reset'?0:1;if(response.data.status==status){$('#emailError').fadeOut();$('#heAnyError').val(0);}else{$('#emailError').text(response.data.messe).show();$('#heAnyError').val(1);}}).catch(function(error){$('#heAnyError').val(1);console.log(error);});}else{$('#emailError').text('PleaseenteravalidEmail!').show();$('#heAnyError').val(1);}}else{$('#emailError').fadeOut();$('#heAnyError').val(0);}}functionsendResetPassOtp(){letemail=$('#reg_email').val();letphone=$('#reg_mobile').val();letheAnyError=$('#heAnyError').val();if(!phone&&!email){toastr.error("PleaseEnterPhoneorEmail!");returnfalse;}if(heAnyError==1){toastr.error('Pleaseprovideforminformationproperly!');returnfalse;}$('#phoneError').fadeOut();$('#preloader-active').show();constroute=`mewmewshopbd.com/send-otp-to-phone`;axios.post(route,{phone:phone,email:email}).then(function(response){$('#preloader-active').hide();if(response.data.status==1){$('.hide-after-otp-send').hide();$('.verification-code').fadeIn();$('#heAnyError').val(0);$('#otpCodeInputField').val(response.data.data);toastr.success(response.data.messe);}else{$('#heAnyError').val(1);toastr.error(response.data.messe);}}).catch(function(error){if(error.response.data.errors&&error.response.data.errors.phone){toastr.error(error.response.data.errors.phone[0]);}});}functionverifyResetPassOtp(){letotp=$('#otp').val();letsmsOTP=$('#otpCodeInputField').val();if(otp!=smsOTP){toastr.error('OTPdoesnotmatch!');returnfalse;}if(otp.length==4&&otp==smsOTP){toastr.success('OTPCodeVerified');$('.verification-code').hide();$('.reset-password-form').fadeIn();}}functionresetMyPassword(){letemail=$('#reg_email').val();letmobile=$('#reg_mobile').val();letpassword=$('#reg_password').val();letpassword_confirmation=$('#password_confirmation').val();if(!password){toastr.error("PasswordCannotbeempty!");returnfalse;}if(!password_confirmation){toastr.error("ConfirmyourPassword!");returnfalse;}if(password!=password_confirmation){toastr.error("ConfirmPassworddoesnotmatched!");returnfalse;}constroute=`mewmewshopbd.com/frontend-reset-password`;axios.post(route,{email:email,mobile:mobile,password:password}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);window.location.href="mewmewshopbd.com/user/login";}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}functionsendMyOtp(){letname=$('#reg_name').val();letemail=$('#reg_email').val();letphone=$('#reg_mobile').val();letpassword=$('#reg_password').val();letpassword_confirmation=$('#password_confirmation').val();letheAnyError=$('#heAnyError').val();if(!name){toastr.error("PleaseEnterName!");returnfalse;}if(!phone){toastr.error("PleaseEnterPhone!");returnfalse;}if(!password){toastr.error("PasswordCannotbeempty!");returnfalse;}if(!password_confirmation){toastr.error("ConfirmyourPassword!");returnfalse;}if(password!=password_confirmation){toastr.error("ConfirmPassworddoesnotmatched!");returnfalse;}if(heAnyError==1){toastr.error('Pleaseprovideforminformationproperly!');returnfalse;}$('#phoneError').fadeOut();$('#preloader-active').show();constroute=`mewmewshopbd.com/send-otp-to-phone`;axios.post(route,{phone:phone,email:email}).then(function(response){$('#preloader-active').hide();if(response.data.status==1){$('.hide-after-otp-send').hide();$('.verification-code').fadeIn();$('#heAnyError').val(0);$('#otpCodeInputField').val(response.data.data);toastr.success(response.data.messe);}else{$('#heAnyError').val(1);toastr.error(response.data.messe);}}).catch(function(error){if(error.response.data.errors&&error.response.data.errors.phone){toastr.error(error.response.data.errors.phone[0]);}});}functionverifyOtp(){letotp=$('#otp').val();letsmsOTP=$('#otpCodeInputField').val();letname=$('#reg_name').val();letemail=$('#reg_email').val();letmobile=$('#reg_mobile').val();letpassword=$('#reg_password').val();if(otp!=smsOTP){toastr.error('OTPdoesnotmatch!');returnfalse;}if(otp.length==4&&otp==smsOTP){toastr.success('OTPCodeVerified');constroute=`mewmewshopbd.com/frontend/register`;axios.post(route,{first_name:name,email:email,mobile:mobile,password:password}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);window.location.href="mewmewshopbd.com";}else{toastr.error(response.data.messe);returnfalse;}}).catch(function(error){console.log(error)});}}functionresendOTP(obj){if($(obj).hasClass('disabled')){return;//Exitthefunctionifthe'disabled'classispresent}letphone=$('#contactPhone').val();letemail=$('#contactEmail').val();letemailRegex=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(email.length>0&&!emailRegex.test(email)){toastr.error('Invalidemailaddress!');return;}letphoneFilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(phone.length>0&&!phoneFilter.test(phone)&&phone.length!=11){toastr.error('Pleaseenteravalidmobilenumber!');return;}$('.otp-sended-phone').val(phone);$('.otp-sended-email').val(email);$(obj).addClass('disabled');sendMyOtp('#sendTheOTP','resend');}functionsendMyOtp(obj,type=null){letis_resend=type&&type=='resend'?1:0;letphone=$('#phone').val();letemail=$('#email').val();letheAnyError=$('#heAnyError').val();if(phone==''&&email==''){$('.email-error').html('PhoneorEmailisrequired');$('.email-error').show();setTimeout(()=>{$('.email-error').hide();},3000);returnfalse;}letemailRegex=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;if(email.length>0&&!emailRegex.test(email)){toastr.error('Invalidemailaddress!');return;}letphoneFilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(phone.length>0&&!phoneFilter.test(phone)&&phone.length!=11){toastr.error('Pleaseenteravalidmobilenumber!');return;}if(heAnyError==1){$('.email-error').html('Pleaseprovideinformationproperly!');$('.email-error').show();setTimeout(()=>{$('.email-error').hide();},3000);returnfalse;}else{$('.email-error').hide();constroute=`mewmewshopbd.com/send-otp-to-user`;$(obj).prop('disabled',true);axios.post(route,{phone:phone,email:email,is_resend:is_resend}).then(function(response){letdata=response.data;console.log(data);if(response.data.status==100){//directauthenticationforlocaltoastr.success(response.data.messe);setTimeout(function(){letredirectUrl=`mewmewshopbd.com`;window.location.replace(redirectUrl);},1000);}elseif(response.data.status==1){toastr.success('AnOTPhasbeensendtoyou!');$('#errorMesse').hide();$('.send-otp-section').hide();$('.verify-otp-section').show().removeClass('d-none');$('#contactId').val(data.data.contactId);$('#hashId').val(data.data.hashId);$('#addAfter').removeClass('disabled');letmainOTP=String(response.data.smsOTP);if(mainOTP&&mainOTP.length===4){letfirstOTP=mainOTP[0];letsecondOTP=mainOTP[1];letthirdOTP=mainOTP[2];letfourthOTP=mainOTP[3];$('.first-otp').val(firstOTP);$('.second-otp').val(secondOTP);$('.third-otp').val(thirdOTP);$('.fourth-otp').val(fourthOTP);$('#verificationCode').val(mainOTP);}if(phone){$('#editPhonePart').show();$('#contactPhone,#previousInfo').val(phone);}if(email){$('#editEmailPart').show();$('#contactEmail,#previousInfo').val(email);}startCountdownOTP(data.data.otp_count);}else{$(obj).prop('disabled',false);$('.email-error').text(response.data.messe).show();}}).catch(function(error){if(error.response.data.errors.phone){$(obj).prop('disabled',false);$('.email-error').text(error.response.data.errors.phone[0]).show();}else{$('.email-error').text('');}});}}functionenableEdit(obj,type){if(type=='phone'){$('#contactPhone').removeAttr('readonly');}if(type=='email'){$('#contactEmail').removeAttr('readonly');}}functionstartCountdownOTP(otp_count=null){$('.remove-after').show();$('#addAfter').attr('onclick','');countdownOTP(otp_count);}functioncountdownOTP(otp_count=null){lettimeLeft=otp_count>=2?300:30;consttimerElement=document.getElementById('countTimer');constcountdown=setInterval(()=>{timeLeft--;timerElement.textContent=timeLeft;if(timeLeft0){$('#divider').fadeOut();$('#phonePart').fadeOut();if(emailRegex.test(email)){$(".email-error").text("").hide();$('#heAnyError').val(0);}else{$(".email-error").text("Invalidemailaddress!").show();$('#heAnyError').val(1);}}else{$(".email-error").text("").hide();$('#heAnyError').val(0);$('#divider').fadeIn();$('#phonePart').fadeIn();}}functionvalidatePhone(obj){letmobNum=$(obj).val();varfilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(mobNum.length>0){$('#divider').fadeOut();$('#emailPart').fadeOut();}else{$('#divider').fadeIn();$('#emailPart').fadeIn();}if(filter.test(mobNum)){if(mobNum.length==11){$('#phoneError').hide();$('#heAnyError').val(0);}else{$('#phoneError').text('Pleaseput11digitmobilenumber!').show();$('#heAnyError').val(1);}}else{$('#phoneError').text('Pleaseenteravalidmobilenumber!').show();$('#heAnyError').val(1);if(mobNum.length==0){$('#phoneError').hide();$('#heAnyError').val(0);}}}functionverifyOtp(obj){letotp=$('#verificationCode').val();otp=otp!=null?otp:$('.first-otp').val();letcontact_id=$('#contactId').val();if(otp==''){toastr.error('OTPcannotbeempty!');return;}constroute=`mewmewshopbd.com/verify-user-otp`;axios.post(route,{otp:otp,contact_id:contact_id}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);letauthData=response.data.data;letname=authData.name;letemail=authData.email;letmobile=authData.mobile;if(!name||!email||!mobile){$('.verify-otp-section').hide();$('.re-edit-profile').show();$('#edit_first_name').val(authData.first_name!=mobile&&authData.first_name!=email?authData.first_name:'');$('#edit_last_name').val(authData.last_name);if(email){$('.edit_email').hide();$('#edit_email').val(email);}if(mobile){$('.edit_phone').hide();$('#edit_phone').val(mobile);}setTimeout(function(){toastr.info('Pleaseedityourprofilefirst!');},1000);}else{setTimeout(function(){letredirectUrl=`mewmewshopbd.com`;window.location.replace(redirectUrl);},1000);}}else{toastr.error(response.data.messe);}}).catch(function(error){if(error.response.data.errors.phone){$('#phoneError').text(error.response.data.errors.phone[0]).show();}else{$('#phoneError').text('');}});}functionisValidName(edit_first_name){//varregex=/^[a-zA-Z]+$/;varregex=/^[a-zA-Z\s]+$/;returnregex.test(edit_first_name);}functionreEditProfile(obj){letedit_first_name=$('#edit_first_name').val();letedit_last_name=$('#edit_last_name').val();letedit_email=$('#edit_email').val();letedit_phone=$('#edit_phone').val();letreEditError=$('#reEditError').val();letname=edit_first_name;if(edit_last_name!=null){name=name+''+edit_last_name;}if(edit_first_name==''){toastr.error('FirstNameisrequired!');$('#reEditError').val(1);returnfalse;}if(!isValidName(edit_first_name)){toastr.error('FirstNameshouldcontainonlyletters!');$('#reEditError').val(1);returnfalse;}if(edit_email==''){toastr.error('Emailisrequired!');$('#reEditError').val(1);returnfalse;}letfilterEmail=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(!filterEmail.test(edit_email)){toastr.error('PleaseenteravalidEmail!');$('#reEditError').val(1);returnfalse;}if(edit_phone==''){toastr.error('Phoneisrequired!');$('#reEditError').val(1);returnfalse;}if(edit_phone.length11){toastr.error('Phoneismustbe11digitnumber!');$('#reEditError').val(1);returnfalse;}letfilterPhone=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(!filterPhone.test(edit_phone)){toastr.error('Pleaseenteravalidmobilenumber!');$('#reEditError').val(1);returnfalse;}if(reEditError==1){toastr.error('Pleasefilltheformproperly!');returnfalse;}else{$(obj).prop('disabled',true);constroute=`mewmewshopbd.com/login-by-phone`;axios.post(route,{first_name:edit_first_name,last_name:edit_last_name,name:name,phone:edit_phone,email:edit_email}).then(function(response){letdata=response.data;console.log(data);if(response.data.status==1){toastr.success('Auhtenticated!');setTimeout(function(){letredirectUrl=`mewmewshopbd.com`;window.location.replace(redirectUrl);},1000);}else{$(obj).prop('disabled',false);toastr.error(response.data.messe);}}).catch(function(error){toastr.error(error.response.data.errors.phone[0]);});}}//CodeVerificationvarverificationCode=[];$(".verification-codeinput[type=text]").keyup(function(e){//GetInputforHiddenField$(".verification-codeinput[type=text]").each(function(i){verificationCode[i]=$(".verification-codeinput[type=text]")[i].value;$('#verificationCode').val(Number(verificationCode.join('')));//console.log($('#verificationCode').val());});//console.log(event.key,event.which);if($(this).val()>0){if(event.key==1||event.key==2||event.key==3||event.key==4||event.key==5||event.key==6||event.key==7||event.key==8||event.key==9||event.key==0){$(this).next().focus();}}else{if(event.key=='Backspace'){$(this).prev().focus();}}});//keyup$('.verification-codeinput').on("paste",function(event,pastedValue){console.log(event)$('#txt').val($content)console.log($content)//console.log(values)});//$editor.on('paste,keydown',function(){httpjsfiddle.net/5bNx4/#run//var$self=$(this);//setTimeout(function(){//var$content=$self.html();//$clipboard.val($content);//},100);//});functionvalidateExistEmail(obj){$('#reEditError').val(1);letemail=$(obj).val();varfilter=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;if(email.length>0){if(filter.test(email)){$('.edit-error').fadeOut();$('.reEditBtn').prop('disabled',true);constroute=`mewmewshopbd.com/check-email-exist-or-not`;axios.post(route,{email:email}).then(function(response){$('.reEditBtn').prop('disabled',false);if(response.data.status==1){$('.edit-error').fadeOut();$('#reEditError').val(0);}else{$('.edit-error').text(response.data.messe).show();$('#reEditError').val(1);}}).catch(function(error){console.log(error);$('#reEditError').val(1);});}else{$('.edit-error').text('PleaseenteravalidEmail!').show();$('#reEditError').val(1);}}else{$('.edit-error').fadeOut();$('#reEditError').val(1);}}functionvalidateExistPhone(obj){$('#reEditError').val(1);letmobNum=$(obj).val();varfilter=/^(?:\+?88|0088)?01[3-9]\d{8}$/;if(mobNum.length>0){if(filter.test(mobNum)){if(mobNum.length==11){$('.edit-error').fadeOut();$('.reEditBtn').prop('disabled',true);constroute=`mewmewshopbd.com/check-phone-exist-or-not`;axios.post(route,{mobile:mobNum}).then(function(response){$('.reEditBtn').prop('disabled',false);if(response.data.status==0){$('.edit-error').text(response.data.messe).show();$('#reEditError').val(1);}else{$('.edit-error').fadeOut();$('#reEditError').val(0);}}).catch(function(error){console.log(error);$('#reEditError').val(1);});}else{$('.edit-error').text('Pleaseput11digitmobilenumber!').show();$('#reEditError').val(1);}}else{$('.edit-error').text('Pleaseenteravalidmobilenumber!').show();$('#reEditError').val(1);}}else{$('.edit-error').fadeOut();$('#reEditError').val(1);}}functionquickView(id){constroute=`mewmewshopbd.com/get/get-product-info`;axios.post(route,{id:id}).then(function(response){letproduct=response.data.product;letcombinations=response.data.combinations;letfile_exist=response.data.file_exist;variationData2={};$('#quickViewModal').modal('toggle');$('.clear-variation.has-variant').hide();$('.clear-variation.in-detail').hide();$('.q-name').text('');$('.q-price').text('');$('.q-desc').text('');$('.q-sku').text('');$('.q-brand').text('');//$('.quick-view-modal.btn-close').attr('onclick',`clearVariations('Yes',${product.id})`);if(product!=null){console.log(product.wishlist);letwishlist=authInfo&&product.wishlist?`removeFromWishlist(this,${product.id})`:`addToWishlist(this,${product.id})`;$('.q-name').text(product.name);$('.q-name').append(``);$('#qPreviousSKU').val(product.sku);if((product.discount_variations.length)>0){$('.q-price').text((Math.round(product.discount_variations[0]?.unit_price_after_disc)));$('.q-old-price,#discountPercent').show();$('.q-offer-price').text(Math.round(product.variation?.sell_price_inc_tax));$('#qOldOffers').val(Math.round(product.variation?.sell_price_inc_tax));$('#qOldPrices').val((Math.round(product.discount_variations[0]?.unit_price_after_disc)));if(product.discount_variations[0].discount_type==1){$('#discountPercent.hot').text('-'+Math.round(product.discount_variations[0]?.discount_amount)+'%');$('#previousDiscount').val('-'+Math.round(product.discount_variations[0]?.discount_amount)+'%');}else{$('#discountPercent.hot').text('-৳'+Math.round(product.discount_variations[0]?.discount_amount));$('#previousDiscount').val('-৳'+Math.round(product.discount_variations[0]?.discount_amount));}}else{$('.q-old-price,#discountPercent').hide();$('.q-price').text((Math.round(product.variation?.sell_price_inc_tax)));$('#qOldOffers').val(0);$('#qOldPrices').val((Math.round(product.variation?.sell_price_inc_tax)));}vartextContent=$("").html(product.product_description).text();lettruncatedText=textContent.length>200?textContent.substring(0,200):textContent;$('.q-desc').text(truncatedText);//$('.q-desc').text(textContent);$('.q-sku').text(product.sku);if(product.brand_id){$('.q-brand').text(product.brand?.name);letbrandRoute="mewmewshopbd.com/brand/brand-slug";brandRoute=brandRoute.replace('brand-slug',product.brand?.slug);$('.q-brand').attr('href',brandRoute);}letfullPath='';if(product.category_id){letcategory=product.category;fullPath=category.slug;while(category.parent_categories){category=category.parent_categories;fullPath=category.slug+'/'+fullPath;}}$('.q-category').text(product.category?.name).attr('href',baseUrl+'/product-category/'+fullPath);if(file_exist=='yes'){$('.q-ime').attr('src',product.featured_ime?product.featured_ime?.display_url:(baseUrl+'/img/default.png'));$('#previousImg').val(product.featured_ime?product.featured_ime?.display_url:(baseUrl+'/img/default.png'));}else{$('.q-ime').attr('src',defaultIme);$('#previousImg').val(defaultIme);}$('.stockailibility').html('');$('.q-add-to-cart').html('');$('.q-variations').html('');letcolors='';letsizes='';letes='';letbuyNow='';letaddToCart='';letoutOfStock='';letstockRequest='';letheVariation=product.type=='single'?0:1;letstockRequested='';letstockailibility='';letcolorVariation='';letsizeVariation='';leteVariation='';letchooseVariationBtn='';letvariantNames=[];letvariants='';$.each(combinations,function(key,combine){variantNames.push(combine.variation_template.name);if(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('color')){$.each(combine.variation_template.values,function(key,variationValue){lettooltipBadge='';if(variationValue.color_code){tooltipBadge=`${variationValue.name}`;}else{tooltipBadge=`${variationValue.name}`;}colors+=`${tooltipBadge}`});colorVariation+=`Color${colors}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('colour')){$.each(combine.variation_template.values,function(key,variationValue){lettooltipBadge='';if(variationValue.color_code){tooltipBadge=`${variationValue.name}`;}else{tooltipBadge=`${variationValue.name}`;}colors+=`${tooltipBadge}`});colorVariation+=`Color${colors}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('size')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Size${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('e')){$.each(combine.variation_template.values,function(key,variationValue){es+=`${variationValue.name}`});eVariation+=`e${es}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('weight')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Weight${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('flour')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Flour${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('dose')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Dose${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('quantity')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Quantity${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('shape')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`Shape${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('setno')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`SetNo${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('jerseysize')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`JerseySize${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('houseno')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`HouseNo${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('footballteam')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`FootballTeam${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('combopack')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`ComboPack${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('numberwithsizes')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`NumberWithSizes${sizes}`;}elseif(combine.variation_template&&combine.variation_template.name.toLowerCase().includes('packsize')){$.each(combine.variation_template.values,function(key,variationValue){sizes+=`${variationValue.name}`});sizeVariation+=`PackSize${sizes}`;}else{$.each(combine.variation_template.valueKatzenfutter in Bangladesch im Kombi; Online Pet Shop coms,function(key,variationValue){elses+=`${variationValue.name}`});elseVariation+=`${combine.variation_template.name}${elses}`;}});$(document).find('.variationId').val('');if(heVariation==1){variants=variantNames.join(',');chooseVariationBtn+=`AddToCartBuyNow`;}else{letactualStock=response.data.total_stock;$(document).find('.variationId').val(product.variation.id);if(product.enable_stock==1){if(actualStock!=null&&actualStock>0){addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}else{outOfStock+=`OutOfStock`;if(authInfo!=null&&product.stock_request!=null){stockRequested+=`StockRequested`;}else{stockRequest+=`StockRequest`;}stockailibility+=`ailability:OutOfStock`;}}else{addToCart+=`AddToCart`buyNow+=`BuyNow`stockailibility+=`ailability:InStock`;}}$('.stockailibility').append(stockailibility);$('.q-add-to-cart').append(addToCart);$('.q-add-to-cart').append(buyNow);$('.q-add-to-cart').append(outOfStock);$('.q-add-to-cart').append(stockRequest);$('.q-add-to-cart').append(stockRequested);$('.q-add-to-cart').append(chooseVariationBtn);$('.q-variations').append(colorVariation);$('.q-variations').append(sizeVariation);$('.q-variations').append(eVariation);$('.totalVariation').val(product.product_variations.length);$('.productId').val(product.id);//letlayer_value=product.variation?product.variation.sell_price_inc_tax:'';//letlayer_item_id=product.sku;//letlayer_item_name=product.name;//letlayer_discount=product.discount_variations.length>0?(product.discount_variations[0].unit_price-product.discount_variations[0].unit_price_after_disc).toFixed(2):0;//letlayer_index=0;//letlayer_item_brand=product.brand_id?product.brand.name:'';//letlayer_item_category=product.category_id?product.category.name:'';//letlayer_price=product.variation?product.variation.sell_price_inc_tax:'';//letlayer_quantity=1;//letlayer_item_variant=product.type!='single'?variants:'';//letlayer_coupon='';//gDataLayer('view_item',layer_value,layer_item_id,layer_item_name,layer_discount,layer_index,layer_item_brand,layer_item_category,layer_price,layer_quantity,layer_item_variant,layer_coupon);}//Filtercolor/Size$('.q-list-filter').each(function(){$(this).find('a').on('click',function(event){event.preventDefault();$(this).parent().siblings().removeClass('active');$(this).parent().toggleClass('active');$(this).parents('.q-attr-detail').find('.current-size').text($(this).text());$(this).parents('.q-attr-detail').find('.current-color').text($(this).attr('data-color'));});});}).catch(function(error){console.log(error);});}jQuery(function($){jQuery('.js-accordion-title').on('click',function(){jQuery(this).next().slideToggle(200);//jQuery(this).toggleClass('open',200);jQuery(this).parent(".accordion_block").toggleClass('open',200);});});functionchangeShipAddress(obj,id){constroute="mewmewshopbd.com/change/address";letauthName=``;letauthMobile=``;axios.post(route,{id:id}).then(function(response){letdata=response.data;if(data.status!=0){toastr.success('Addresschangedsuccessfully!');$('#addressModal').modal('toggle');window.location.reload();$('.replace-address').empty();letdefaultAddr='';letdefaultBill='';letdefaultDelivery=data.data.selectedAddress;if(defaultDelivery.is_delivery_address==1){defaultAddr+=`DefaultDeliveryAddress`;}if(defaultDelivery.is_billing_address==1){defaultBill+=`DefaultBillingAddress`;}$('#shippingAddress').val(defaultDelivery.address);$('.replace-address').append(`${authName}${authMobile}${defaultDelivery.district?.name}|${defaultDelivery.sub_district?.name}${defaultDelivery.address}${defaultDelivery.address_label}${defaultAddr}${defaultBill}`);letpreviousDefault=$('#defaultSelected').val();$('#defaultSelected').val(id);$('.replace-selected'+previousDefault).empty();$('.replace-selected'+previousDefault).append(`Select`);$('.replace-selected'+id).empty();$('.replace-selected'+id).append(`Selected`);}else{toastr.error(data.messe);}}).catch(function(error){});}functionchangeAddress(){$('#addressModal').modal('toggle');}functionaddAddress(fromModal){if(fromModal=='yes'){$('#addressModal').modal('toggle');}setTimeout(()=>{$('.addAddressModal').modal('toggle');},500);}functionsubmitForm(formType){$(formType).submit();}functiondeleteAddress(address_id){letroute="mewmewshopbd.com/get/remove-customer-address";axios.post(route,{address_id:address_id}).then(function(response){if(response.data.status==1){toastr.success(response.data.messe);if(isCheckoutRoute){setTimeout(()=>{window.location.reload();},500);}//$('.address-card'+address_id).remove();}else{toastr.error(response.data.messe);}}).catch(function(error){});}functioneditAddress(id,fromModal=null){$('#firstname').val('');$('#lastname').val('');$('#customerMobile').val('');$('#customerEmail').val('');$('#post_code').val('');$('#address_id').val('');$('#address_label').val('');$('#mainAddress').val('');$('#defaultDelivery').prop('checked',false);$('#defaultBilling').prop('checked',false);$('.customerDistrict').html('');letroute="mewmewshopbd.com/get/get-address-info";axios.post(route,{id:id}).then(function(response){letaddressInfos=response.data.addressInfos;letdistrictInfos=response.data.districts;letareaInfos=response.data.areas;letcustomer_areas=response.data.customer_areas;if(addressInfos){letaddress_label=addressInfos.address_label==='Home'?'Home':(addressInfos.address_label==='Office'?'Office':'Other');$('#address_id').val(id);$('#firstname').val(addressInfos.first_name);$('#lastname').val(addressInfos.last_name);$('#customerMobile').val(addressInfos.phone);$('#customerEmail').val(addressInfos.email);$('#post_code').val(addressInfos.post_code);$('#address_label').val(address_label).trigger('change');$('#mainAddress').val(addressInfos.address);if(fromModal=='yes'){$('#addressModal').modal('toggle');}setTimeout(()=>{$('#staticBackdrop2').modal('toggle');},500);if(addressInfos.is_delivery_address==1){$('#defaultDelivery').prop('checked',true);}if(addressInfos.is_billing_address==1){$('#defaultBilling').prop('checked',true);}//DISTRICTletoptions='SelectDistrict';if(districtInfos.length>0){$.each(districtInfos,function(key,district){options+=`${district.name}`;});}$('.customerDistrict').html(options);if(addressInfos!=null&&addressInfos.zone_id!=null){letoptions2='SelectaZone';if(areaInfos.length>0){$.each(areaInfos,function(key,area){options2+=`${area.name}`;});}$('.customerArea').html(options2);}letareaOptions='SelectArea';if(customer_areas.length>0){$.each(customer_areas,function(key,customerArea){areaOptions+=`${customerArea.name}`;});$('.customerZone').html(areaOptions);}else{$('.edit-customer-zone').hide();}}}).catch(function(error){});}functiongetCustomerAreas(obj,type=null){let_this=$(obj).find(':selected');letsub_district_id=_this.val()!==undefined?_this.val():'';if(sub_district_id!==''&&sub_district_id!==undefined&&sub_district_id!==null){letroute="mewmewshopbd.com/get/get-customer-area-info";axios.get(route,{params:{sub_district_id:sub_district_id}}).then(function(response){letcustomer_areas=response.data;letareaOptions='SelectArea';if(customer_areas.length>0){$.each(customer_areas,function(key,customerArea){areaOptions+=`${customerArea.name}`;});if(type=='add'){$('.add-customer-zone').show();$('#customerKatzenfutter in Bangladesch im Kombi; Online Pet Shop comZone,.customerZone').html(areaOptions);}else{$('.edit-customer-zone').show();$('.customerZone').html(areaOptions);}}else{if(type=='add'){$('.add-customer-zone').hide();}else{$('.edit-customer-zone').hide();}}}).catch(function(error){});}}$(".latest-products").each(function(key,item){varid=$(this).attr("id");varsliderID='#'+id;varappendArrowsClassName='#'+id+'-arrows'$(sliderID).slick({dots:false,infinite:true,speed:1000,arrows:true,autoplay:true,slidesToShow:4,slidesToScroll:1,loop:true,adaptiveHeight:true,responsive:[{breakpoint:1025,settings:{slidesToShow:4,slidesToScroll:1,}},{breakpoint:768,settings:{slidesToShow:3,slidesToScroll:1,}},{breakpoint:575,settings:{slidesToShow:2,slidesToScroll:1}},{breakpoint:320,settings:{slidesToShow:2,slidesToScroll:1}}],prevArrow:'',nextArrow:'',appendArrows:(appendArrowsClassName),});});functionfocusSearch(obj){letsearchInput=document.querySelector('#searchInput');if(searchInput){searchInput.focus();}}functionaddToWishlist(obj,product_id){if(!authInfo){openLogin();return;}$(obj).addClass('heart-active');$(obj).closest('.wishlist-btn').find('path').attr('fill','#ff1493');setTimeout(()=>{$(obj).removeClass('heart-active');},500);letroute="mewmewshopbd.com/store-or-delete-wishlist";axios.post(route,{product_id:product_id}).then(function(response){if(response.data.status==2){toastr.info(response.data.messe);}elseif(response.data.status==1){toastr.success(response.data.messe);letsetOnclick=`removeFromWishlist(this,${product_id})`;$(obj).attr('onclick',setOnclick);if(enableLayer){letproduct=response.data?.product;letdiscount=response.data?.discount;letvariation=response.data?.variation;gDataLayer('add_to_wishlist',variation?variation.sell_price_inc_tax:0,product.sku,product.name,discount?(discount.unit_price-discount.unit_price_after_disc):0,0,response.data?.cat_name,response.data?.brand_name,variation?variation.sell_price_inc_tax:0,1,variation&&(variation.name!='DUMMY')?variation.name:'','');}}else{toastr.error(response.data.messe);$(obj).closest('.wishlist-btn').find('path').attr('fill','var(--primary)');$(obj).removeClass('heart-active');}}).catch(function(error){console.log(error);$(obj).closest('.wishlist-btn').find('path').attr('fill','var(--primary)');$(obj).removeClass('heart-active');toastr.error('Somethingwentwrong!');});}functionremoveFromWishlist(obj,product_id){if(!authInfo){openLogin();return;}$(obj).removeClass('heart-active');letroute="mewmewshopbd.com/store-or-delete-wishlist";axios.post(route,{product_id:product_id,delete:'yes'}).then(function(response){console.log(response);if(response.data.status==1){toastr.success(response.data.messe);letsetOnclick=`addToWishlist(this,${product_id})`;$(obj).attr('onclick',setOnclick);$(obj).closest('.wishlist-btn').find('path').attr('fill','var(--primary)');$(obj).closest('.wishlist-button').find('path').attr('fill','var(--white)');}else{toastr.error(response.data.messe);$(obj).addClass('heart-active');}}).catch(function(error){console.log(error);$(obj).addClass('heart-active');toastr.error('Somethingwentwrong!');});}functiongDataLayer(peType,layer_value,layer_item_id,layer_item_name,layer_discount,layer_index,layer_item_brand,layer_item_category,layer_price,layer_quantity,layer_item_variant,layer_coupon){//console.log('peType=>'+peType);//console.log('layer_value=>'+layer_value);//console.log('layer_item_id=>'+layer_item_id);//console.log('layer_item_name=>'+layer_item_name);//console.log('layer_discount=>'+layer_discount);//console.log('layer_index=>'+layer_index);//console.log('layer_item_brand=>'+layer_item_brand);//console.log('layer_item_category=>'+layer_item_category);//console.log('layer_price=>'+layer_price);//console.log('layer_quantity=>'+layer_quantity);//console.log('layer_item_variant=>'+layer_item_variant);//console.log('layer_coupon=>'+layer_coupon);dataLayer.push({ecommerce:null});dataLayer.push({event:peType,ecommerce:{currency:"BDT",value:layer_value,items:[{item_id:layer_item_id,item_name:layer_item_name,affiliation:"",coupon:layer_coupon,discount:layer_discount,index:layer_index,item_brand:layer_item_brand,item_category:layer_item_category,item_category2:"",item_category3:"",item_category4:"",item_category5:"",item_list_id:"",item_list_name:"",item_variant:layer_item_variant,location_id:"",price:layer_price,quantity:layer_quantity}]}});}