Help
RSS
API
Feed
Maltego
Contact
Domain > brightsparkcomponents.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2025-04-22
104.21.51.134
(
ClassC
)
2025-11-25
172.67.181.35
(
ClassC
)
Port 443
HTTP/1.1 200 OKDate: Tue, 25 Nov 2025 14:22:52 GMTContent-Type: text/html; charsetUTF-8Transfer-Encoding: chunkedConnection: keep-alivex-powered-by: PHP/8.1.33Nel: {report_to:cf-nel,success_fraction:0.0,max_age:604800}expires: Thu, 19 Nov 1981 08:52:00 GMTCache-Control: no-store, no-cache, must-revalidatepragma: no-cacheReport-To: {group:cf-nel,max_age:604800,endpoints:{url:https://a.nel.cloudflare.com/report/v4?seY4Tp%2Fpd11qmVIF9kbF8QiTNsHjGHW2j76OFNaBYIcl%2BJCnHR7mZMGVxN60s9%2FGfrNP%2FKZj0E3rgCXdSRTqetHSs15vHKQB67%2FFCrof28n6TwCtOyjtV}}vary: Accept-EncodingServer: cloudflareaccess-control-allow-origin: *access-control-allow-methods: GET, POST, OPTIONSaccess-control-allow-headers: Content-Type, Authorizationx-turbo-charged-by: LiteSpeedcf-cache-status: DYNAMICSet-Cookie: PHPSESSIDkjt8cr54306e8ee9g94gifp44g; Secure; Path/CF-RAY: 9a41ccf8597c1ef3-PDXalt-svc: h3:443; ma86400 !DOCTYPE html>html langen>head> meta charsetutf-8> meta http-equivX-UA-Compatible contentIEedge> meta nameviewport contentwidthdevice-width, initial-scale1> title>Bright Spark Components/title> link relstylesheet typetext/css href./config/css/bootstrap.min.css?v1764080572> link relstylesheet typetext/css hrefstyle.css?v1764080572> link relstylesheet hrefhttps://pro.fontawesome.com/releases/v5.10.0/css/all.css /> script srchttps://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js>/script> link hrefhttps://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css relstylesheet> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.min.css> link relstylesheet hrefconfig/css/swiper-bundle.min.css /> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css /> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick-theme.min.css /> link relstylesheet hrefhttps://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css /> link relstylesheet hrefconfig/css/site_custom.css?v1764080572 /> link hrefhttps://unpkg.com/aos@2.3.1/dist/aos.css relstylesheet> script srcconfig/js/swiper-bundle.min.js>/script> script srchttps://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.1.1/chroma.min.js>/script>/head>style>.slick-slide { outline: none;}.thumbnail-slider .slick-slide { margin: 0 5px;}.thumbnail-slider .slick-slide img { cursor: pointer;} #loading-spinner { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 1000; background: rgba(255, 255, 255, 0.8); padding: 20px; border-radius: 10px;}.spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto;}@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); }}.product-wrapper { position: relative; min-height: 300px; }/style>script> function getCookie(name) { const cookies document.cookie.split(;); const sanitizedCookieName name.replace(/,; \t\r\n\013\014/g, _); for (let cookie of cookies) { const cookieName, cookieValue cookie.trim().split(); if (cookieName sanitizedCookieName) { return decodeURIComponent(cookieValue); } } return null; // Cookie not found } function setCookieWithExpiration(name, value, seconds) { const sanitizedCookieName name.replace(/,; \t\r\n\013\014/g, _); // Calculate expiration time const expirationTime new Date(); expirationTime.setTime(expirationTime.getTime() + (seconds * 1000)); // Convert seconds to milliseconds // Construct the cookie string const cookieString `${name}${encodeURIComponent(sanitizedCookieName)}; expires${expirationTime.toUTCString()}; path/`; // Set the cookie document.cookie cookieString; }/script>body> div classnav-home> /div> script srcminiCart.js>/script> section classtop_bar_section5 notification-bar-container5 topbar-background-color p-1> div classcarousel-slider-container> div classcarousel-container> div classcarousel> div classtopbar_slide5 topbar-text-color> span classbold-heading notification-template5-font-size text-base>Shop Now and Save Big!/span> /div> /div> /div> /div>/section>section classheader_section header_section73 idheader_section> header classnavbar-nav12 navtemplatesSec> div class > nav classnavbar navbar-expand-lg p-0 nav-color nav-text-color topbarRow1 > div classsection-max-width px-3 w-100> div classrow py-3 py-lg-2 stylejustify-content: space-between;> div classcol-0 col-lg-4 d-lg-flex align-items-center justify-content-start mm> div classd-none d-lg-block> div classcollapse navbar-collapse idnavbarsExample03> ul classnavbar-nav styleflex-wrap: wrap;> li classnav-item active > a classnav-link nav-text-color hrefindex.php> Front Page /a> /li> li classnav-item > a classnav-link nav-text-color hrefshop> Commerce /a> /li> li classnav-item > a classnav-link nav-text-color hrefshop> Explore Store /a> /li> li classnav-item > a classnav-link nav-text-color hrefcart> Cart Overview /a> /li> li classnav-item > a classnav-link nav-text-color hrefcontact> Support /a> /li> /ul> /div> /div> /div> div classcol-2 col-lg-0 d-flex align-items-center justify-content-end d-block d-lg-none> button classnavbar-toggler text-md menu-icon nav-icon-color p-0 me-auto typebutton data-bs-togglecollapse data-bs-target#navbarsExample03 aria-controlsnavbarsExample03 aria-expandedfalse aria-labelToggle navigation> span classnavbar-toggler-icon nav-icon-color> span classnav-icon-color stylewidth:auto;height:auto;>i classfas fa-bars>/i> /span> /span> /button> /div> div classcol-8 col-lg-4 text-center d-flex align-items-center justify-content-center> a classheader_brand nav-text-color text-md hrefindex.php> Bright Spark Components /a> /div> div classcol-2 col-lg-4 d-flex align-items-center justify-content-end stylegap: 13px;> div classnav-icon-color d-none d-lg-block> /div> ul classnavbar-nav cart-nav ml-auto> li classcart_link> a hrefjavascript:void(0);> div classcart-container> span class nav-text-color text-md nav-icon-color>i classfas fa-cart-arrow-down>/i> /span> span idcart_count classcart-count >/span> /div> span classcart_amt text-sm nav-text-color d-none> $ span idcart_amt classsubtotalAmount text-sm nav-text-color style-d-inline-navbar>/span> /span> /a> div classmini-cart-content navCart16> div classtopbarNavcart16> h2 classshoppingHead16 m-0 text-lg>Cart review/h2> button classmini-cart-close text-lg>i classfal fa-times-circle>/i>/button> /div> div classminicart_inner14> div classminicart_table table-responsive> table classtable minicart_details6 > tbody idminicartRow> tr classemptyRow>td stylepadding: 10px; colspan3>p classcart_empty text-base>You don’t have anything in your cart./p>/td>/tr> /tbody> /table> /div> /div> div classmini-cart-action16> div classminiCartTotal> p classtext14 text-md>Sub Total:/p> p classpricetext text-md>$ span classsubtotalAmount text-md idsubtotalAmount>/span>/p> /div> div classminicart_buttons> a hrefcart.php classbutton-primary w-50 mt-3 text-sm styledisplay: flex;justify-content: center;align-items: center;padding: 12px;min-height: 40px;> View Cart /a> a hrefshop classbutton-primary w-50 mt-3 text-sm styledisplay: flex;justify-content: center;align-items: center;padding: 12px;min-height: 40px;> Check Out /a> /div> /div> /div> /li> /ul> /div> /div> /div> /nav> /div> div classnav-color d-lg-none> div classcollapse navbar-collapse idnavbarsExample03> ul classnavbar-nav> li classnav-item active > a classnav-link nav-text-color hrefindex.php> Front Page /a> /li> li classnav-item > a classnav-link nav-text-color hrefshop> Commerce /a> /li> li classnav-item > a classnav-link nav-text-color hrefshop> Explore Store /a> /li> li classnav-item > a classnav-link nav-text-color hrefcart> Cart Overview /a> /li> li classnav-item > a classnav-link nav-text-color hrefcontact> Support /a> /li> /ul> /div> /div> /header> /section>section classherosection109 dark-mode qmVEPtIi section-max-width px-3 idHeroSection styleoverflow:hidden;> div classw-100 sSEWPazQ> div classrow > div classcol-12 > div classherosectionImage> /div> /div> /div> div classrow contentBox108 > div classcol-12 > p classbrandName109 text-md>Power up your projects with our electrifying selection/p> /div> div classcol-12 col-lg-6 > p classtagline109 text-xl>Power Up Your Projects/p> /div> div classcol-12 col-lg-6> p classslogan109 text-md>Affordable sparks for all your needs./p> a classbutton-primary mt-3 text-sm styledisplay: inline-block;padding: 13px 20px;min-height: 40px;text-align: center; width:unset hrefshop.php>SHOP NOW/a> /div> /div> /div>/section>div classcta-section50 position-relative qmVEPtIi section-max-width px-3 idCTASection styleoverflow:hidden;> div classcontainer50 sSEWPazQ> a hrefshop.php classimage-box50 active > img srcimg/8d1h81L0fPUYcuI3n8dwQviDvlpwNEPnF0enlTj8.webp altDecoration> div classtext-overlay text-md>Unique Products/div> /a> a hrefshop.php classimage-box50> img srcimg/RRvp9kIMLzgnNoksrBgD2CkYb429cvAFd6LQ4auD.webp altSale> div classtext-overlay text-md>Latest Trends/div> /a> a hrefshop.php classimage-box50> img srcimg/RZ1Idm95Axe1hZuu0eRI5IWzoxtTiNdAAwcijKCG.webp altFurniture> div classtext-overlay text-md>Seasonal Specials/div> /a> a hrefshop.php classimage-box50> img srcimg/8f9scxB5UgtrlFxpqs7Dv5nz0qlJJEqEO7T9zWeT.webp altLighting> div classtext-overlay text-md>Shop the Collection/div> /a> /div>/div>section classpopular_section popular_section30 p-0 qmVEPtIi section-max-width px-3 styleoverflow:hidden;> div classw-100 sSEWPazQ idrelated_prods> div classrow pdtHeading gx-3 mb-3> div classcol-12 col-lg-6 mb-3> h3 classm-auto text-xl idshop>Best Deals Now/h3> /div> div classcol-12 col-lg-6> p classm-auto text-md>Questions? We’re here to provide the answers./p> a classbutton-primary mt-3 text-sm styledisplay: inline-block;padding: 13px 20px;min-height: 40px;text-align: center; width:unset hrefshop.php>SHOP NOW/a> /div> /div> div classrow mt-2 > div classcol-12> div classrow g-3> div classproduct-section product-section29 col-12 col-md-6 col-lg-3 data-product-index9 data-product-idproduct-1> div classproduct-block> div classpdtImageWrapper position-relative> img classprod_img30 src./config/images/products/Electrical Equipment MUBW35 Series.webp> a hrefjavascript:void(0); classbtn_shop btn_shop30 shop-btn-color text-sm idbtn_shop> span classtext-base> i classfas fa-cart-arrow-down>/i> /span>View Product/a> /div> div classproduct-details text-base> h5 class product-name30 >Electrical Equipments MUBW35 Series/h5> div classreview mt-3> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star-half-alt>/i> /span> /div> div classpdt-price-wrapper> p classprod_price30 text-base> span>$45.59/span> /p> p classmt-3>/p> /div> /div> /div> /div> div classproduct-section product-section29 col-12 col-md-6 col-lg-3 data-product-index13 data-product-idproduct-1> div classproduct-block> div classpdtImageWrapper position-relative> img classprod_img30 src./config/images/products/Customized Electrical Control Box.webp> a hrefjavascript:void(0); classbtn_shop btn_shop30 shop-btn-color text-sm idbtn_shop> span classtext-base> i classfas fa-cart-arrow-down>/i> /span>View Product/a> /div> div classproduct-details text-base> h5 class product-name30 >Customized Electrical Control Box/h5> div classreview mt-3> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfar fa-star>/i> /span> /div> div classpdt-price-wrapper> p classprod_price30 text-base> span>$45.78/span> /p> p classmt-3>/p> /div> /div> /div> /div> div classproduct-section product-section29 col-12 col-md-6 col-lg-3 data-product-index6 data-product-idproduct-2> div classproduct-block> div classpdtImageWrapper position-relative> img classprod_img30 src./config/images/products/10KV Polymer Lightning Arrester.webp> a hrefjavascript:void(0); classbtn_shop btn_shop30 shop-btn-color text-sm idbtn_shop> span classtext-base> i classfas fa-cart-arrow-down>/i> /span>View Product/a> /div> div classproduct-details text-base> h5 class product-name30 >10KV Polymer Lightning Arrester/h5> div classreview mt-3> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> /div> div classpdt-price-wrapper> p classprod_price30 text-base> span>$15.41/span> /p> p classmt-3>/p> /div> /div> /div> /div> div classproduct-section product-section29 col-12 col-md-6 col-lg-3 data-product-index5 data-product-idproduct-1> div classproduct-block> div classpdtImageWrapper position-relative> img classprod_img30 src./config/images/products/Sockets and Accessories Supply.webp> a hrefjavascript:void(0); classbtn_shop btn_shop30 shop-btn-color text-sm idbtn_shop> span classtext-base> i classfas fa-cart-arrow-down>/i> /span>View Product/a> /div> div classproduct-details text-base> h5 class product-name30 >Sockets and Accessories Supply/h5> div classreview mt-3> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfas fa-star>/i> /span> span classstar> i classfar fa-star>/i> /span> /div> div classpdt-price-wrapper> p classprod_price30 text-base> span>$12.39/span> /p> p classmt-3>/p> /div> /div> /div> /div> /div> /div> /div> /div>/section>section classfeatures-section19-bg qmVEPtIi section-max-width px-3 styleoverflow:hidden;> div classfeatures-section19-container sSEWPazQ> div classsingle-feature-item> div classfeature-icon-container> span classfeature-icon-font-size19> i classfal fa-shipping-fast>/i> /span> /div> div> h4 classsingle-feature-heading text-md>Rapid Shipment/h4> p classsingle-feature-description text-base>We ship our products rapidly, making them accessible to customers quickly./p> /div> /div> div classsingle-feature-item> div classfeature-icon-container> span classfeature-icon-font-size19> i classfas fa-clock>/i> /span> /div> div> h4 classsingle-feature-heading text-md>Releasing a new collection every month/h4> p classsingle-feature-description text-base>We enable our customers to fully express themselves and be apart from the rest./p> /div> /div> div classsingle-feature-item> div classfeature-icon-container> span classfeature-icon-font-size19> i classfas fa-shield-alt>/i> /span> /div> div> h4 classsingle-feature-heading text-md>High-Quality Materials/h4> p classsingle-feature-description text-base>We stand behind our products and services and guarantee your satisfaction./p> /div> /div> div classsingle-feature-item> div classfeature-icon-container> span classfeature-icon-font-size19> i classfas fa-money-bill-wave>/i> /span> /div> div> h4 classsingle-feature-heading text-md>Pay Monthly for Your Purchase/h4> p classsingle-feature-description text-base>Pay back the loan in monthly installments and prepay at any time without penalty./p> /div> /div> /div>/section>section classqDywrZCQ1cC dark-mode qmVEPtIi section-max-width px-3 idaboutSection styleoverflow:hidden;> div classcontainerr sSEWPazQ> div classswiper swiperAB55> div classswiper-wrapper> div classswiper-slide stylebackground-image: url(./img/ehQOvmLR0QsKz8ooacRH1AgIDYMTDHB0lXnbXYbI.webp);> div classslide-content> h2 classtext-xl>Building Better Shopping/h2> p classtext-md>Hey there! Welcome to Bright Spark Components, your go-to destination for all things electrical. From top-quality parts to cutting-edge equipment, weve got you covered. Lets spark some conversation and find the perfect solution for your needs./p> a hrefshop.php classbutton-primary my-2 text-sm stylepadding: 13px 20px;min-height: 40px;text-align: center;display: inline-block;width:unset;>Start Shopping Today/a> /div> /div> div classswiper-slide stylebackground-image: url(./img/etcBWc1b5RZ3xKMTqz2M4QxUU4R4NbNjvjCsPyIY.webp);> div classslide-content> h2 classtext-xl>Building Better Shopping/h2> p classtext-md>Hey there! Welcome to Bright Spark Components, your go-to destination for all things electrical. From top-quality parts to cutting-edge equipment, weve got you covered. Lets spark some conversation and find the perfect solution for your needs./p> a hrefshop.php classbutton-primary my-2 text-sm stylepadding: 13px 20px;min-height: 40px;text-align: center;display: inline-block;width:unset;>View Product/a> /div> /div> div classswiper-slide stylebackground-image: url(./img/KqlQBwOqQB4rJJ0XvHZP3luLQs9vF0VoZCqfy67t.webp);> div classslide-content> h2 classtext-xl>Building Better Shopping/h2> p classtext-md>Hey there! Welcome to Bright Spark Components, your go-to destination for all things electrical. From top-quality parts to cutting-edge equipment, weve got you covered. Lets spark some conversation and find the perfect solution for your needs./p> a hrefshop.php classbutton-primary my-2 text-sm stylepadding: 13px 20px;min-height: 40px;text-align: center;display: inline-block;width:unset;>Contact Us/a> /div> /div> /div> div classswiper-pagination> /div> div classswiper-button-prev> /div> div classswiper-button-next> /div> /div> /div>/section>div classqmVEPtIi section-max-width px-3 styleoverflow:hidden;> section class faqs-template6 sSEWPazQ> div styletext-align: center;> h4 classheading text-xl>Quick Answers to Common Questions/h4> /div> div classfaq-container> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(0)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>1/span> /div> span>What is the return address for products?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer0>Our return address is 1942 W Gray St #1230, Houston, TX, 77019, USA./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(1)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>2/span> /div> span>What are your customer service hours?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer1>Our customer service team is available from 8 am to 4 pm, Monday through Friday./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(2)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>3/span> /div> span>What is the shipping period for orders?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer2>Our shipping period is 3-5 business days./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(3)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>4/span> /div> span>Do your products come with warranties?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer3>Yes, all of our products come with warranties. Please refer to the specific product page for more information./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(4)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>5/span> /div> span>What should I do if I need to dispute a charge?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer4>If you need to dispute a charge, please contact our customer service team at (866) 399-4886 or a href/cdn-cgi/l/email-protection class__cf_email__ data-cfemail62111712120d10162200100b050a161112031009010d0f120d0c070c16114c010d0f>email protected/a>./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(5)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>6/span> /div> span>Why isnt my coupon code working?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer5>If your coupon code is not working, please double check that it is still valid and has been entered correctly. If you continue to have issues, please contact our customer service team for assistance./div> /div> div classfaq-item> div classfaq-question text-md onclicktoggleAnswer(6)> div classicon-ques text-md styledisplay: flex;gap: 15px; align-items: center;> div classicon1 text-md> span stylecolor:var(--primary_text_color)>7/span> /div> span>Can I split my order into multiple shipments?/span> /div> div classicon text-md> /div> /div> div classfaq-answer text-md idanswer6>Unfortunately, we are unable to split orders into multiple shipments at this time. All items will be shipped together in one package./div> /div> /div> /section>/div>div idproductContainer>/div>footer classfooter50 footer-background-color p-0 py-4 py-lg-5 idfooter> div classsection-max-width px-3> div classrow pb-3 Firstsection> div classcol-lg-3 col-12> div classmb-3 mb-lg-0> h5 class brand text-md>Bright Spark Components/h5> div> p class mb-2 text-base>Ever Stream, LLC/p> p classtext-base>© 2025 Bright Spark Components. All Rights Reserved/p> /div> /div> /div> div classcol-lg-4> div classmb-3 mb-lg-0> h5 classtext-md>CONTACT US/h5> div class> ul classcontact-widget> li classd-flex> span classicons text-md> i classfab fa-rocketchat>/i> /span> div classinfo text-base>Live Chat br>8 am to 4 pm | Mon - Fri/div> /li> li classd-flex> span classicons text-md> i classfar fa-envelope>/i> /span> div classinfo text-base style-1-alias-footer-content style word-break: break-all;>a href/cdn-cgi/l/email-protection class__cf_email__ data-cfemail98ebede8e8f7eaecd8faeaf1fff0ecebe8f9eaf3fbf7f5e8f7f6fdf6ecebb6fbf7f5>email protected/a>/div> /li> li classd-flex> span classicons text-md> i classfab fa-whatsapp>/i> /span> div classinfo text-base>(866) 399-4886/div> /li> /ul> /div> /div> /div> div classcol-lg-3 col-12> div classmb-3 mb-lg-0> h5 classtext-md>LEGAL/h5> div class> ul> li> a classlinkSpace text-base hrefterms>Terms Policy/a> li> a classlinkSpace text-base hrefprivacy>Privacy Terms/a> /li> /ul> /div> /div> /div> div classcol-lg-2 col-12> div classmb-0 mb-lg-0> h5 classtext-md>ABOUT/h5> div class> ul> li class> a classtext-base hrefindex.php>Front Page/a> /li> li class> a classtext-base hrefcontact>Contact/a> /li> li class> a classtext-base hrefterms>Terms Policy/a> /li> li class> a classtext-base hrefprivacy>Privacy Terms/a> /li> /ul> /div> /div> /div> /div> div classrow > div classcol-lg-6 col-12 > div class> a classtext-base style margin-bottom: 1rem; >Payment methods/a> div classfooter-cc mt-2> div classfooter-cc > img classpe-2 src./config/images/payment/O7nDlDLfrEaS0MAW8nqQAyHsQRfKEFSy7HtJz16M.webp> img classpe-2 src./config/images/payment/BSSUD2leOqqOHvxDvZFhmaZjTOSmFFUlk5IQklL3.webp> img classpe-2 src./config/images/payment/PmCD8zAng8E4HqKcEc6TBbroOQYdjpm7Gd1W72K6.webp> /div> /div> /div> /div> /div> /div>/footer> div classmodal fade emailpop9 idmarketingPopup> div classmodal-dialog modal-lg> div classmodal-content p-0 styleborder:none;> div classmodal-header styleborder-bottom:none;> button typebutton classclosebtn text-md data-bs-dismissmodal aria-labelClose> span aria-hiddentrue stylecolor:#fff;> i classfal fa-times-circle>/i> /span> /button> /div> div classmodal-body p-0 > div classrow m-0 mainrowdiv> div classcol-12 col-lg-6 p-0 m-0> div classrightContainer > h1 classtitleContents text-xl>Subscribe to Stay Ahead/h1> p idbtn1 classparatext text-base>Fresh drops and exclusive promos delivered weekly./p> form classform idmarketingPopupForm> div classform-group> input typetext classform-control emailinput text-base required idname placeholderEnter Your First Name> input typeemail classform-control emailinput text-base required idemail placeholderEnter your Email> span classtext-danger error-email text-base styledisplay: none;>Email is required/span> /div> button typesubmit idsaveButton classbutton-primary w-100 mt-2 text-sm styledisplay: flex;justify-content: center;align-items: center;padding: 12px;min-height: 40px;>Sign Up/button> /form> /div> /div> div classcol-12 col-lg-6 p-0 m-0 d-none d-lg-block> div classimagBackground> /div> /div> /div> /div> /div> /div>/div> section> div idCookieBanner classsection-consent5 > p class text-base> img classlogo height40 width40 srchttps://cdn.shopify.com/s/files/1/0595/8975/5077/t/19/assets/pandectes-logo.png?v1709703938 altBlackButterfly />By using our site, you agree to our use of cookies. Learn more about how we use them to enhance your browsing experience./p> div classbtn-container> button classbutton-primary text-sm onclickrejectCookies() stylewidth:unset;padding: 12px;min-height: 50px;>Reject Cookies/button> button classbutton-primary text-sm onclickacceptCookies() stylewidth:unset;padding: 12px;min-height: 50px;>Accept/button> /div> /div>/section> div classmodal fade idquickViewModal tabindex-1 aria-labelledbyquickViewModalLabel aria-hiddentrue> div classmodal-dialog modal-lg> div classmodal-content > div classmodal-header> h5 classmodal-title text-center idquickViewModalLabel>/h5> button typebutton classbtn-close data-bs-dismissmodal aria-labelClose>/button> /div> div classmodal-body> div classrow idquickViewModalContent> /div> /div> /div> /div> /div> script data-cfasyncfalse src/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js>/script>script srchttps://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js>/script> script typetext/javascript src./config/js/include/index.js>/script> script typetext/javascript src./config/js/include/custom.js>/script> script typetext/javascript srchttps://cdnjs.cloudflare.com/ajax/libs/wow/1.1.2/wow.min.js>/script> script> new WOW().init(); /script> script srchttps://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.1/TweenMax.min.js> /script> style>@import url(https://fonts.googleapis.com/css2?familyFigtree:ital,wght@0,300..900;1,300..900&displayswap);/style>style>@import url(https://fonts.googleapis.com/css2?familyRacing+Sans+One&displayswap);/style>style> *{ font-family: Figtree, sans-serif; } h1, h2, h3, h4, h5, h6 { font-family: Racing Sans One, sans-serif; }/style> script> function cookiesResponse(cookieResponse){ $.ajax({ url: config/ajax.php?actioncookie_response, type: POST, data: { cookieResponse: cookieResponse }, success: function(response) { if(response){ $(#CookieBanner).hide(); } localStorage.setItem(cookie_answer,1); }, error: function(xhr, status, error) { alert(An error occurred: + xhr.responseText); } }); } function closeBanner() { $(#CookieBanner).hide(); localStorage.setItem(cookie_answer,1); } function acceptCookies() { $(#CookieBanner).hide(); cookiesResponse(accept); } function rejectCookies() { $(#CookieBanner).hide(); cookiesResponse(reject); } $(document).ready(function() { $(#loadingMask).fadeOut(); if(localStorage.getItem(cookie_answer)){ $(#cookieBanner).hide(); } }); /script> script srchttps://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/owl.carousel.min.js>/script> script srchttps://cdnjs.cloudflare.com/ajax/libs/malihu-custom-scrollbar-plugin/3.1.5/jquery.mCustomScrollbar.concat.min.js>/script>script srcscript.js>/script>script srcconfig/js/site_custom.js>/script>script> /script>script> const productsPerPage 8; let currentPage 1; let isLoading false; // Prevent multiple AJAX calls let paginationType number; loadProducts(paginationType none ? 1 : currentPage, false, paginationType none); function loadProducts(page 1, append false, fetchAll false) { if (isLoading) return; isLoading true; // Set loading state let requestData fetchAll ? { all: true,filename: index.php } : { page, limit: productsPerPage,filename: index.php }; // Get the current URL search parameters const urlParams new URLSearchParams(window.location.search); // Check if sort parameter exists or if you want to add all parameters if (urlParams.has(sort) || true) { // Remove || true if you only want to add when sort exists // Object to hold grouped parameters (for arrays) const groupedParams {}; // Group parameters that end with (array parameters) urlParams.forEach((value, key) > { // Check if this is an array parameter (ends with ) const isArrayParam key.endsWith(); const baseKey isArrayParam ? key.slice(0, -2) : key; if (isArrayParam) { // Initialize array if not exists if (!groupedParamsbaseKey) { groupedParamsbaseKey ; } // Add the value to the array groupedParamsbaseKey.push(value); } else { // For non-array parameters, just add the value if (!groupedParamskey) { groupedParamskey value; } } }); // Merge the grouped parameters into requestData Object.assign(requestData, groupedParams); } // Show the loading spinner inside the product section $(#loading-spinner).show(); $.ajax({ url: fetch_products.php, type: POST, data: requestData, success: function(response) { const data JSON.parse(response); $(.load-more-div).remove(); if (append) { $(.product-wrapper).append(data.html); } else { $(#productContainer).html(data.html); } console.log(page,page); // Hide the loading spinner $(#loading-spinner).hide(); if (!fetchAll) { currentPage page + 1; $(#load-more).attr(data-page, currentPage); } // Generate pagination numbers if pagination type is number // if (paginationType number) { // generatePaginationNumbers(page, data.totalPages); // } $(#productContainer).trigger(productsLoaded); if(page data.totalPages){ isLoading false; // Reset loading state } }, error: function(xhr, status, error) { console.error(AJAX Error:, error); // Hide the loading spinner in case of error $(#loading-spinner).hide(); isLoading false; // Reset loading state } }); } // Function to check if sort parameters exist in the URL function hasSortParameters() { const urlParams new URLSearchParams(window.location.search); // List of sort-related parameters you want to check const sortParams sort, order, sort_by, order_by; // Add any other sort params you use return sortParams.some(param > urlParams.has(param)); } if(number infinite_scroll){ // Infinite Scroll // Function to check if the product section is visible function isProductSectionInView() { const productWrapper $(.product-wrapper); if (productWrapper.length 0) return false; const windowHeight $(window).height(); const scrollTop $(window).scrollTop(); const elementOffset productWrapper.offset().top; const elementHeight productWrapper.outerHeight(); return scrollTop + windowHeight > elementOffset + elementHeight + 200; } // Scroll event to load more products when near the product section $(window).on(scroll, function() { if (isProductSectionInView()) { loadProducts(currentPage, true); } }); }else if(number load_button){ // Load More Button Click $(document).on(click, #load-more, function() { let nextPage $(this).attr(data-page) || 1; loadProducts(parseInt(nextPage), true); }); }else if(number number){ // function generatePaginationNumbers(currentPage, totalPages) { // const paginationContainer $(div classpagination-container>/div>); // const paginationList $(ul classpagination>/ul>); // // Add Previous button // if (currentPage > 1) { // paginationList.append(` // li classpage-item> // a href# classpage-link-btn page-link data-page${currentPage - 1}>Previous/a> // /li> // `); // } // // Add page numbers // for (let i 1; i totalPages; i++) { // const isActive i currentPage ? btn-primary : btn-secondary; // paginationList.append(` // li classpage-item> // a href# classpage-link-btn btn ${isActive} data-page${i}>${i}/a> // /li> // `); // } // // Add Next button // if (currentPage totalPages) { // paginationList.append(` // li classpage-item> // a href# classpage-link-btn page-link data-page${currentPage + 1}>Next/a> // /li> // `); // } // // Append pagination to the container // paginationContainer.append(paginationList); // $(#productContainer).append(paginationContainer); // } // Handle click events on pagination numbers $(document).on(click, .page-link-btn, function(e) { e.preventDefault(); const page $(this).data(page); loadProducts(page); }); } var quickViewProdId ; function ProductQuickView(index,id) { $(#quickViewModalContent).html(); $.ajax({ url: product_quick_view.php, type: POST, data: { productId: index}, success: function(response) { const data JSON.parse(response); $(#quickViewModalContent).html(data.html); $(#quickViewModal).modal(show); const $product $(`data-product-id${id}`); quickViewProdId id; initProduct($product,id); }, error: function(xhr, status, error) { console.error(AJAX Error:, error); } }); } // Clear modal content & remove product data on modal close $(#quickViewModal).on(hidden.bs.modal, function () { $(#quickViewModalContent).empty(); // Clear modal removeProductFromSessionStorage(quickViewProdId); // Remove product from storage quickViewProdId ; }); $(document).ready(function() { // Handle form submission $(#subscription-form).on(submit, function(e) { e.preventDefault(); // Prevent the default form submission // You can add form validation here if needed // Simulate an AJAX call (replace this with your actual AJAX call) // For demonstration, well just show the success message after a short delay setTimeout(function() { // Hide the form $(#subscription-form).hide(); // Show success message $(#success-message).show(); // Scroll to the newsletter section scrollToSection(#newsletter, 3); }, 500); }); // Robust scrolling function with retry capability function scrollToSection(selector, retriesLeft) { const element $(selector); if (element.length > 0 && element.is(:visible)) { const offset 100; // Adjust as needed const position element.offset().top - offset; $(html, body).stop(true).animate({ scrollTop: position }, { duration: 800, easing: swing, complete: function() { console.log(Successfully scrolled to section); } }); } else if (retriesLeft > 0) { console.log(Element not ready, retrying...); setTimeout(function() { scrollToSection(selector, retriesLeft - 1); }, 500); } else { console.error(Failed to scroll to section after multiple attempts); } } $(document).on(submit, #filterSortForm, function(event) { event.preventDefault(); // Prevent the default form submission // Use serializeArray() instead of serialize() to properly handle arrays var formDataArray $(this).serializeArray(); var formData $.param(formDataArray); // This properly handles arrays var newUrl window.location.pathname + ? + formData; // Change the URL without reloading the page history.pushState(null, , newUrl); isLoading false; currentPage 1; loadProducts(1,false,false); }); }); /script>script srchttps://cdn.jsdelivr.net/npm/@fingerprintjs/fingerprintjs@3/dist/fp.min.js>/script>script srchttps://unpkg.com/aos@2.3.1/dist/aos.js>/script>script>const fpPromise FingerprintJS.load();fpPromise.then(fp > fp.get()).then(result > { const visitorId result.visitorId; // Send visitorId to the server via AJAX fetch(store_visitor.php, { method: POST, headers: { Content-Type: application/json, }, body: JSON.stringify({ visitorId: visitorId }), }) .then(response > response.json()) .then(data > { console.log(data.message); // Success or error message }) .catch(error > { console.error(Error:, error); });});/script>script> /script>script>// Get all products data from session storagefunction getAllProductsData() { return JSON.parse(sessionStorage.getItem(productsData)) || {};}// Get specific product data by IDfunction getProductData(productId) { const products getAllProductsData(); return productsproductId || null;}// Use a structured approach:function updateProductSessionData(productId, data) { // Get existing products data or initialize empty object const productsData JSON.parse(sessionStorage.getItem(productsData)) || {}; // Initialize this products data if it doesnt exist if (!productsDataproductId) { productsDataproductId {}; } // Merge new data with existing data productsDataproductId { ...productsDataproductId, ...data }; // Save back to sessionStorage sessionStorage.setItem(productsData, JSON.stringify(productsData));}// Helper function to remove product from sessionStoragefunction removeProductFromSessionStorage(productKey) { // 1. Get current data const storedData sessionStorage.getItem(productsData); if (!storedData) return; try { // 2. Parse and verify structure const productsData JSON.parse(storedData); if (typeof productsData ! object || Array.isArray(productsData)) { throw new Error(Expected an object, got something else); } // 3. Delete the key if it exists if (productsDataproductKey) { delete productsDataproductKey; // 4. Save back to sessionStorage sessionStorage.setItem(productsData, JSON.stringify(productsData)); console.log(Removed:, productKey); // Debug log } } catch (e) { console.error(Error updating sessionStorage:, e); }}// Main document ready handler$(document).ready(function() { // Initialize each product $(.product-detail-section).each(function() { const $product $(this); const productId $product.data(product-id); // Initialize product-specific functionality initProduct($product, productId); });});/script>script> //fetch size options for each products var variantsArray ; $(document).ready(function() { var displayVariantType dropdown; // Remove any existing handlers first $(document).off(change, .proSize-ul inputtyperadio, .proSize-ul select, .proSize-ul inputtypetext); $(document).on(change, .proSize-ul inputtyperadio, .proSize-ul select, .proSize-ul inputtypetext, function() { console.log(Change event triggered for:, this.tagName, this.type); const $product $(this).closest(.product-detail-section); const productId $product.data(product-id); const productData getProductData(productId); if(displayVariantType dropdown){ var size_val $product.find(.proSize-ul select) .map(function() { var selectedVal $(this).find(option:selected).val(); return selectedVal && selectedVal ! ? selectedVal : null; }) .get() .filter(function(id) { return id ! null && id ! ; // Exclude null or empty IDs }) .join(-); var size_key $product.find(.proSize-ul select) .map(function() { var selectedOption $(this).find(option:selected); return selectedOption.length && selectedOption.val() ! ? selectedOption.attr(data-size) : null; }) .get() .filter(function(id) { return id ! null && id ! ; // Exclude null or empty IDs }) .join(-); }else if(displayVariantType counter){ var size_val $product.find(.proSize-ul inputtypetext).map(function() { return $(this).data(value); }).get().join( - ); var size_key $product.find(.proSize-ul inputtypetext).map(function() { return $(this).data(size); }).get().join(-); }else{ var size_val $product.find(.proSize-ul inputtyperadio:checked).map(function() { return $(this).val(); }).get().join( - ); var size_key $product.find(.proSize-ul inputtyperadio:checked).map(function() { return $(this).attr(data-size); }).get().join(-); } // Debug logging for dropdown values if(displayVariantType dropdown){ console.log(Dropdown change - size_val:, size_val); console.log(Dropdown change - size_key:, size_key); console.log(All dropdowns:, $product.find(.proSize-ul select).length); $product.find(.proSize-ul select).each(function(index) { var $select $(this); var selectedOption $select.find(option:selected); console.log(Dropdown + index + :, { selected value: selectedOption.val(), selected data-size: selectedOption.attr(data-size), has selection: selectedOption.length > 0 }); }); } updateProductSessionData(productId, { data_product_selected_size: size_val, data_product_selected_size_key: size_key }); $product.find(.pdt-button).find(button).prop(disabled,true); if(displayVariantType dropdown){ // Handle dropdowns var selectedId $(this).find(option:selected).data(id); $product.find(.proSize-ul select).find(option).removeAttr(disabled); }else{ // Collect selected variation IDs var selectedId $(this).attr(data-id); $product.find(.proSize-ul inputtyperadio).removeAttr(disabled); } // console.log(selectedId,selectedId); var prod_id_inner productData.id; var prod_index productData.index; sale_type productData.data_sale_type; sale_type parseInt(sale_type); console.log(sale_type); if(sale_type 1 && no yes){ $.ajax({ url: config/config.php, type: POST, data: { type: 9, prod_id_inner: prod_id_inner, prod_index:prod_index, variation_id: selectedId }, cache: false, success: function(result) { var response JSON.parse(result); if(response.length 0){ getSelectedVariationsAndPrice($product,productId); }else{ // response is the list of variation IDs to disable response.forEach(function(variationID) { // Find input fields with the matching data-id and disable them if(displayVariantType dropdown){ // Handle dropdowns $product.find(select optiondata-id + variationID + ) .prop(disabled, true) .prop(selected, false); }else{ // Collect selected variation IDs $product.find(inputdata-id + variationID + ) .prop(disabled, true) .prop(checked, false); } }); } } }); }else{ getSelectedVariationsAndPrice($product,productId); } }); $(document).off(change, .prod-optionstypecheckbox); $(document).on(change, .prod-optionstypecheckbox, function() { const $product $(this).closest(.product-detail-section); const productId $product.data(product-id); const productData getProductData(productId); const value $(this).attr(value); // Get group value const isChecked $(this).is(:checked); // Check if the clicked option is checked var currentPriceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) var productPrice productData.data_product_price_variant; let price value; if (isChecked) { if (currentPriceType percentage) { price (price / 100) * parseFloat(productPrice); } var subTotalPrice parseFloat($product.find(.subtotal_price).text()); // Convert to float var pdtPrice subTotalPrice + parseFloat(price); // Ensure value is also a number $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } updateProductSessionData(productId, { data_product_price: pdtPrice, data_total_price: pdtPrice, }); } else { var subTotalPrice parseFloat($product.find(.subtotal_price).text()); // Convert to float if (currentPriceType percentage) { price (price / 100) * parseFloat(productPrice); } var pdtPrice subTotalPrice - parseFloat(price); // Ensure value is also a number $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } updateProductSessionData(productId, { data_product_price: pdtPrice, data_total_price: pdtPrice, }); } var optionsValue $product.find(.prod-optionstypecheckbox:checked, .prod-optionstyperadio:checked) .map(function() { return $(this).attr(data-value); }) .get() .join(,); updateProductSessionData(productId, { data_product_selected_option: optionsValue, }); }); let previousValues {}; $(document).off(change, .prod-optionstyperadio); $(document).on(change, .prod-optionstyperadio, function() { const $product $(this).closest(.product-detail-section); const productId $product.data(product-id); const productData getProductData(productId); var currentRadioValue $(this).val(); // The value of the newly selected radio button var groupName $(this).attr(name); // Get the name of the radio group (this groups them) var currentPriceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) var productPrice productData.data_product_price_variant; // If there is a previous value for this group if (previousValuesgroupName ! undefined) { var previousRadioButton $product.find(inputtyperadioname + groupName + value + previousValuesgroupName + ); // If there was a previous selection, subtract its price if (previousRadioButton.length > 0) { var prevPrice parseFloat(previousRadioButton.val()); var prevPriceType previousRadioButton.attr(data-price-type); // Adjust subtotal based on the previous price type if (prevPriceType percentage) { prevPrice (prevPrice / 100) * parseFloat(productPrice); } var subTotalPrice parseFloat($product.find(.subtotal_price).text()); var pdtPrice subTotalPrice - parseFloat(prevPrice); // Subtract previous selected options price $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); // Update subtotal price } } // Add the price of the newly selected radio button var currentPrice parseFloat($(this).val()); if (currentPriceType percentage) { currentPrice (currentPrice / 100) * parseFloat(productPrice); } var subTotalPrice parseFloat($product.find(.subtotal_price).text()); var pdtPrice subTotalPrice + parseFloat(currentPrice); // Add the new selected radio options price $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); // Update subtotal price if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } // Update session storage with the new price updateProductSessionData(productId, { data_product_price: pdtPrice, data_total_price: pdtPrice }); var optionsValue $(.prod-optionstypecheckbox:checked, .prod-optionstyperadio:checked) .map(function() { return $(this).attr(data-value); }) .get() .join(,); updateProductSessionData(productId, { data_product_selected_option: optionsValue, }); sessionStorage.setItem(data_product_selected_option, optionsValue); // Store the current selected radio button value to use as the previous value for next change previousValuesgroupName currentRadioValue; }); }); function fetchSizes($product, productId) { const productData getProductData(productId); var checksizeoption productData.sizeOption; var prod_id_inner productData.id; var prod_index productData.index; var displayVariantType dropdown; if (checksizeoption yes) { $.ajax({ url: config/config.php, type: POST, data: { type: 5, prod_id_inner: prod_id_inner, prod_index:prod_index }, cache: false, success: function(result) { console.log(AJAX result for dropdowns:, result); $product.find(p.proSize-ul).html(result); // Wait a bit for DOM to be ready, then set initial values setTimeout(function() { console.log(After populating dropdowns:); console.log(Total dropdowns found:, $product.find(.proSize-ul select).length); $product.find(.proSize-ul select).each(function(index) { var $select $(this); console.log(Dropdown + index + :, { html: $select.html(), selected value: $select.val(), options count: $select.find(option).length }); }); if(displayVariantType dropdown){ var firstDropdown $product.find(.proSize-ul select).first(); if(firstDropdown.length) { var firstOption firstDropdown.find(option:selected); if(firstOption.length) { var size_val firstOption.val(); var size_key firstOption.attr(data-size); updateProductSessionData(productId, { data_product_selected_size: size_val, data_product_selected_size_key: size_key, data_product_shipping: 0 }); } } } else if(displayVariantType counter){ var firstInput $product.find(.proSize-ul inputtypetext).first(); if(firstInput.length) { var size_val firstInput.data(value); var size_key firstInput.data(size); updateProductSessionData(productId, { data_product_selected_size: size_val, data_product_selected_size_key: size_key, data_product_shipping: 0 }); } } else { var firstRadio $product.find(.proSize-ul inputtyperadio:checked).first(); if(firstRadio.length) { var size_val firstRadio.val(); var size_key firstRadio.attr(data-size); updateProductSessionData(productId, { data_product_selected_size: size_val, data_product_selected_size_key: size_key, data_product_shipping: 0 }); } } // Trigger the change event only once for the first checked input if(displayVariantType dropdown){ const firstDropdown $product.find(.proSize-ul select).first(); if(firstDropdown.length) { firstDropdown.trigger(change); } }else if(displayVariantType counter){ var firstInput $product.find(.proSize-ul inputtypetext).first(); if(firstInput.length) { firstInput.trigger(change); } }else{ var firstRadio $product.find(.proSize-ul inputtyperadio:checked).first(); if(firstRadio.length) { firstRadio.trigger(change); } } }, 100); } }); }else{ $product.find(div.size-options-text).hide(); $product.find(div.size-opts).hide(); updateProductSessionData(productId, { data_product_selected_size: , data_product_selected_size_key: }); } } function priceFixesAccordingToBilling($product, productId) { const productData getProductData(productId); var bill_model productData.billingModel; if(bill_model 8){ $max_qty productData.trialMaxqty; $is_show_max_qty productData.trialMaxqty; }else{ $max_qty productData.maxQuantity; $is_show_max_qty productData.enableMaxqty; } var max_qty $max_qty; var is_show_max_qty $is_show_max_qty; $product.find(.pdt-button).find(button).prop(disabled,true); // Run Preloader $(#loadingMask).fadeIn(); if (bill_model 4 || bill_model 5 || bill_model 6 || bill_model 7) { var subtotal $(span.subtotal_price).html(); var shipping $(span.shipping_price).html(); var total $(span.single_pdt_price).html(); updateProductSessionData(productId, { data_product_price: subtotal, data_product_shipping: shipping, data_total_price: total, data_product_type: , }); } else { updateProductSessionData(productId, { data_product_type: , }); } $(#loadingMask).fadeOut(); let getPdtType $product.find(.pdt_type+bill_model+ .selectbox).val(); if (getPdtType undefined && bill_model 1) { getPdtType 1; } if(getPdtType 1 && is_show_max_qty > 0){ if(max_qty 1){ $product.find(.qty-col .increase).prop(disabled, true); } $product.find(.qty-col).css(display, flex); $product.find(.select-qty-text).css(display, block); }else{ $product.find(.qty-col).css(display, none); $product.find(.select-qty-text).css(display, none); } setTimeout(function(){ getSelectedVariationsAndPrice($product,productId); },2000); } function getSelectedVariationsAndPrice($product, productId) { const productData getProductData(productId); var displayVariantType dropdown; if(displayVariantType dropdown){ // Handle dropdowns var selectedIds $product.find(.proSize-ul select) .map(function() { return $(this).find(option:selected).attr(data-id); }) .get() .filter(function(id) { return id; // Exclude null or empty IDs }) .join(,); }else if(displayVariantType counter){ var selectedIds $product.find(.proSize-ul inputtypetext).map(function() { return $(this).data(id); }).get().join(,); }else{ // Collect selected variation IDs var selectedIds $product.find(.proSize-ul inputtyperadio:checked).map(function() { return $(this).attr(data-id); }).get().join(,); } var checksizeoption productData.sizeOption; var prod_id_inner productData.id; var prod_index productData.index; sale_type productData.data_sale_type; sale_type parseInt(sale_type); if(sale_type 1){ $.ajax({ url: config/config.php, type: POST, data: { type: 7, prod_id_inner: prod_id_inner, prod_index:prod_index, variation_ids: selectedIds }, cache: false, success: function(result) { var response JSON.parse(result); if(no yes && responsepdt_price > 0){ $product.find(.subtotal_old_price).show(); $product.find(span.subtotal_old_price_symbol).show(); $product.find(.subtotal_price).text(responsepdt_price); $product.find(.subtotal_old_price).text(responsepdt_old_price); }else{ $product.find(.subtotal_old_price).hide(); $product.find(span.subtotal_old_price_symbol).hide(); $product.find(.subtotal_price).text(responsepdt_old_price); responsepdt_price responsepdt_old_price; } $product.find(.subtotal_price).text(responsepdt_price); if(responsepdt_sku ! && responsepdt_sku ! null){ $product.find(.product-sku).text(responsepdt_sku); $product.find(.sku-col).show(); }else if((responsepdt_sku || responsepdt_sku null) && selectedIds ! ){ $product.find(.product-sku).text(); $product.find(.sku-col).hide(); } updateProductSessionData(productId, { data_product_price_variant: responsepdt_price, }); var subtotal parseFloat($product.find(.subtotal_price).text()); // Current subtotal price // Sum for checkboxes var selectedValuesSumCheckbox $product.find(.prod-optionstypecheckbox:checked).map(function () { var value parseFloat($(this).val()); // Get the value var priceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) if (priceType percentage) { return (value / 100) * subtotal; // Calculate percentage of the subtotal } else { return value; // Fixed price } }).get().reduce(function (acc, value) { return acc + value; // Sum all the selected values }, 0); // Sum for radio buttons var selectedValuesSumRadio $product.find(.prod-optionstyperadio:checked).map(function () { var value parseFloat($(this).val()); // Get the value var priceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) if (priceType percentage) { return (value / 100) * subtotal; // Calculate percentage of the subtotal } else { return value; // Fixed price } }).get().reduce(function (acc, value) { return acc + value; // Sum all the selected values }, 0); if(selectedValuesSumCheckbox > 0){ responsepdt_price (parseFloat(responsepdt_price) + parseFloat(selectedValuesSumCheckbox.toFixed(2))).toFixed(2); } if(selectedValuesSumRadio > 0){ responsepdt_price (parseFloat(responsepdt_price) + parseFloat(selectedValuesSumRadio.toFixed(2))).toFixed(2); } $product.find(.subtotal_price).text(responsepdt_price); if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } updateProductSessionData(productId, { data_product_price: response.pdt_price, data_total_price : response.pdt_price }); $product.find(.pdt-button).find(button).prop(disabled,false); } }); }else{ var subtotal parseFloat($product.find(.subtotal_price).text()); // Current subtotal price updateProductSessionData(productId, { data_product_price_variant: subtotal, }); // Sum for checkboxes var selectedValuesSumCheckbox $product.find(.prod-optionstypecheckbox:checked).map(function () { var value parseFloat($(this).val()); // Get the value var priceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) if (priceType percentage) { return (value / 100) * subtotal; // Calculate percentage of the subtotal } else { return value; // Fixed price } }).get().reduce(function (acc, value) { return acc + value; // Sum all the selected values }, 0); // Sum for radio buttons var selectedValuesSumRadio $product.find(.prod-optionstyperadio:checked).map(function () { var value parseFloat($(this).val()); // Get the value var priceType $(this).attr(data-price-type); // Get the price type (fixed/percentage) if (priceType percentage) { return (value / 100) * subtotal; // Calculate percentage of the subtotal } else { return value; // Fixed price } }).get().reduce(function (acc, value) { return acc + value; // Sum all the selected values }, 0); if(selectedValuesSumCheckbox > 0){ var currentPrice parseFloat(selectedValuesSumCheckbox); var subTotalPrice parseFloat($product.find(.subtotal_price).text()); var pdtPrice subTotalPrice + currentPrice; // Add the new selected radio options price $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); // Update subtotal price if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } // Update session storage with the new price updateProductSessionData(productId, { data_product_price: pdtPrice, data_total_price : pdtPrice }); } if(selectedValuesSumRadio > 0){ var currentPrice parseFloat(selectedValuesSumRadio); var subTotalPrice parseFloat($product.find(.subtotal_price).text()); var pdtPrice subTotalPrice + currentPrice; // Add the new selected radio options price $product.find(.subtotal_price).text(pdtPrice.toFixed(2)); // Update subtotal price if(parseInt($product.find(.qty).val()) > 1){ $product.find(.single_pdt_price).text( (parseInt($product.find(.qty).val()) * $product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); }else{ $product.find(.single_pdt_price).text(($product.find(.subtotal_price).text() * 1 + $product.find(.shipping_price).text() * 1).toFixed(2)); } // Update session storage with the new price updateProductSessionData(productId, { data_product_price: pdtPrice, data_total_price : pdtPrice }); } $product.find(.pdt-button).find(button).prop(disabled,false); } } function setSaleType($product, productId){ const productData getProductData(productId); var prod_id productData.data_product; var multiPrice productData.data_product_MultiPrice; var billmod productData.data_product_billing_model; if (billmod 4 || billmod 5 || billmod 6 || billmod 7) { if (billmod 4) { updateProductSessionData(productId, { data_sale_type: 2, }); var getid .pdt_type4; } if (billmod 5) { updateProductSessionData(productId, { data_sale_type: 1, }); var getid .pdt_type5; } if (billmod 6) { updateProductSessionData(productId, { data_sale_type: 2, }); var getid .pdt_type6; } if (billmod 7) { updateProductSessionData(productId, { data_sale_type: 1, }); var getid .pdt_type7; } //need to retreive which type of product is selected on page load and showing the plus minus button or dropdown var firstpdt $product.find(getid + option:first).val(); $product.find(.qty-col).css(display, flex); $product.find(.select-qty-text).css(display, block); // var isexectued; // for bill model 4,5,6,7 get the price and pass it to the next page $product.find(.selectbox).on(change, function() { var model_id $(this).val(); if (model_id 1) { updateProductSessionData(productId, { data_sale_type: 1, data_product_type: 1 }); } if (model_id 2) { updateProductSessionData(productId, { data_sale_type: 2, data_product_type: }); } if (model_id 3) { updateProductSessionData(productId, { data_sale_type: 3, data_product_type: }); } $.ajax({ url: config/config.php, type: POST, data: { type: 4, model_id: model_id, prod_id: prod_id, multiPrice: multiPrice, }, cache: false, success: function (data) { var response JSON.parse(data); var pdt_special_price parseFloat(response.pdt_special_price); var pdt_price parseFloat(response.pdt_price); var shipping_price parseFloat(response.shipping_price); if(no yes && pdt_special_price > 0){ $product.find(span.subtotal_old_price).show(); $product.find(span.subtotal_old_price_symbol).show(); var totalPrice pdt_special_price + shipping_price; $product.find(span.subtotal_price).html(pdt_special_price.toFixed(2)); $product.find(span.subtotal_old_price).html(pdt_price.toFixed(2)); $product.find(span.shipping_price).html(shipping_price.toFixed(2)); $product.find(span.single_pdt_price).html(totalPrice.toFixed(2)); updateProductSessionData(productId, { data_product_price: pdt_special_price, data_product_shipping: shipping_price, data_total_price : totalPrice }); }else{ $product.find(span.subtotal_old_price).hide(); $product.find(span.subtotal_old_price_symbol).hide(); var totalPrice pdt_price + shipping_price; $product.find(span.subtotal_price).html(pdt_price.toFixed(2)); $product.find(span.shipping_price).html(shipping_price.toFixed(2)); $product.find(span.single_pdt_price).html(totalPrice.toFixed(2)); updateProductSessionData(productId, { data_product_price: pdt_price, data_product_shipping: shipping_price, data_total_price : totalPrice }); } }, }); $product.find(.qty-col).css(display, flex); $product.find(.select-qty-text).css(display, block); //set if the product is ss or trl or cntnty if (model_id 1) { updateProductSessionData(productId, { data_sale_type: 1, }); } if (model_id 2) { updateProductSessionData(productId, { data_sale_type: 2, }); } if (model_id 3) { updateProductSessionData(productId, { data_sale_type: 3, }); } priceFixesAccordingToBilling($product, productId); }); } //set if the product is ss or trl or cntnty if (billmod 1) { updateProductSessionData(productId, { data_sale_type: 1, }); } else if (billmod 2 || billmod 8) { updateProductSessionData(productId, { data_sale_type: 2, }); } else if (billmod 3) { updateProductSessionData(productId, { data_sale_type: 3, }); } } function fetchOptions($product, productId) { const productData getProductData(productId); var prod_id_inner productData.id; var prod_index productData.index; $.ajax({ url: config/config.php, type: POST, data: { type: 8, prod_id_inner: prod_id_inner, prod_index:prod_index }, cache: false, success: function(result) { $product.find(p.proOption-ul).html(result); } }); } function handleQtyChange($product, productId, type) { var $qtyInput $product.find(.qty); const productData getProductData(productId); var bill_model productData.billingModel; if(bill_model 8){ $max_qty productData.trialMaxqty; }else{ $max_qty productData.maxQuantity; } //enable & disble qty in product & cart page depend on enableMaxqty key var max_qty $max_qty; let qty parseInt($qtyInput.val()); if (type increase) { qty++; } else if (type decrease && qty > 1) { qty--; } $qtyInput.val(qty); var billmodel productData.billingModel; $pdt_price parseFloat(productData.data_product_price); $tot_price parseFloat(productData.data_total_price); $pdt_qty parseFloat(qty); if (type increase) { $new_pdt_price $pdt_price * $pdt_qty if (qty max_qty) { $product.find(.qty-col .increase).attr(disabled, disabled); } if (qty > 1) { $product.find(.decrease).removeAttr(disabled); } }else{ $product.find(.qty-col .increase).removeAttr(disabled); $new_pdt_price $tot_price - $pdt_price; if (qty 1) { $product.find(.decrease).attr(disabled, disabled); } if (qty 2) { // $(.qty-col #decrease).css(display,none); $product.find(.decrease).prop(disabled, true); } } updateProductSessionData(productId, { data_total_price: $new_pdt_price.toFixed(2), data_pdt_qty: $pdt_qty, }); $product.find(.single_pdt_price).text($new_pdt_price.toFixed(2)); } function showErrorAttributes($product, productId){ const productData getProductData(productId); var not_selected {}; var displayVariantType dropdown; if(displayVariantType dropdown){ // Handle dropdowns $product.find(.proSize-ul select).each(function() { var name $(this).attr(name); if (!not_selectedname) { // If no value is selected in the dropdown if (!$(this).val() || $(this).val() ) { // Get the placeholder or label associated with the dropdown var placeholder $(this).find(option:first).val().split(:)0.trim(); not_selectedname placeholder || No selection; } } }); }else{ $product.find(.proSize-ul inputtyperadio).each(function() { var name $(this).attr(name); if (!not_selectedname) { // If the radio button is not checked and there are no checked radio buttons with the same name if (!$(this).prop(checked) && $product.find(inputname + name + :checked).length 0) { // Extract the text before the comma and trim whitespace var valueText $(this).val().split(:)0.trim(); not_selectedname valueText; } } }); } // Display name and value for each group for (var name in not_selected) { if (not_selected.hasOwnProperty(name)) { var errorMsg Please select the +not_selectedname+.; if(hide inline){ $product.find(.error-message-attr).append(div classerror-message stylefont-size:16px;>+errorMsg+/div>); }else if(hide popup){ $(#error_pop).append(errorMessageVariable.replace(errorMessageVariable, errorMsg)); } } } if(hide inline){ $product.find(.error-message).show(); }else if(hide popup){ $(#error_modal).show(); } } var shoppingCart ; function AddtoCart(productId) { // Scope all selectors to this specific product const $product $(`data-product-id${productId}`); const productData getProductData(productId); var enable_custom_checkout productData.enable_custom_checkout; var custom_checkout_link productData.custom_checkout_link; if(enable_custom_checkout yes){ window.location.href custom_checkout_link; return true; } $product.find(.error-message).remove(); var displayVariantType dropdown; if(productData.isProductAttributes > 0){ if(displayVariantType dropdown){ var selectedDropdowns $product.find(.proSize-ul select).filter(function() { return $(this).val() ! null && $(this).val() ! ; }); console.log(Validation - isProductAttributes:, productData.isProductAttributes); console.log(Validation - selectedDropdowns count:, selectedDropdowns.length); console.log(Validation - all dropdowns:, $product.find(.proSize-ul select).length); $product.find(.proSize-ul select).each(function(index) { console.log(Validation - Dropdown + index + value:, $(this).val()); }); if(productData.isProductAttributes ! selectedDropdowns.length){ showErrorAttributes($product,productId); return true; } }else{ if(productData.isProductAttributes ! $product.find(.proSize-ul inputtyperadio:checked).length){ showErrorAttributes($product,productId); return true; } } } let errorMessages ; $product.find(.proOption-ul inputdata-requiredtrue).each(function () { let name $(this).attr(name); // Check if this group has already been validated if (!$product.find(`inputname${name}:checked`).length) { if (!errorMessages.includes(name)) { errorMessages.push(name); } } }); if (errorMessages.length > 0) { $product.find(.error-message-opt).html(div classerror-message stylefont-size:16px;>Please select required options./span>) $product.find(.error-message).show(); return true; } var data_qty $product.find(.qty).val(); var singleProduct {}; var bill_mod productData.billingModel; var selected_size_key productData.data_product_selected_size_key; console.log(selected_size_key,selected_size_key); //Fill the product object with data if(selected_size_key ! && 0 0){ singleProduct.Id productData.data_product_id + - + selected_size_key.replace(/\s+/g, -); }else{ singleProduct.Id productData.data_product_id; } singleProduct.Image productData.data_product_link; singleProduct.Saletype productData.data_sale_type; singleProduct.SelectedSize productData.data_product_selected_size; singleProduct.SelectedOption productData.data_product_selected_option; //new condition for diffrent type of products singleProduct.Price productData.data_product_price; singleProduct.Ship productData.data_product_shipping; singleProduct.Rbllprice productData.data_product_rbllprice; singleProduct.billModel productData.billingModel; var prod_type productData.data_product_type; var selected_size productData.data_product_selected_size; if ((prod_type && selected_size ) || bill_mod 2 || bill_mod 8) { var pickedSize $product.find(inputnameprod-sizes:checked).val(); singleProduct.Name productData.data_product_title + + (pickedSize ? - + pickedSize : ); } else if (prod_type ! && selected_size ) { singleProduct.Name productData.data_product_title + (prod_type ? ( + prod_type + ) : ); } else if (prod_type && selected_size ! ) { singleProduct.Name productData.data_product_title + - + productData.data_product_selected_size; } else if (prod_type ! && selected_size ! ) { singleProduct.Name productData.data_product_title + ( + prod_type + ) - + productData.data_product_selected_size; } singleProduct.Alias productData.data_product_alias; singleProduct.Qty data_qty; singleProduct.Type prod_type; singleProduct.Total productData.data_total_price; singleProduct.Multiprice productData.data_product_MultiPrice; singleProduct.EnableMaxqty productData.data_product_enableMaxqty; singleProduct.StickyId $product.find(.product-sticky-id).val(); singleProduct.productType productData.data_product_type_1; singleProduct.digitalFile productData.data_product_digital_file; var flag 0; var productCart ; var tot_pdt_count 14; if (flag 0) { shoppingCart.push(singleProduct); sessionStorage.setItem(singleProduct.Id, JSON.stringify(singleProduct)); let items Object.keys(sessionStorage).filter(key > key.trim().match(/^product-/)); items.forEach(function(v, i) { var shopCart JSON.parse(sessionStorage.getItem(v)); productCart.push(shopCart); }); //console.log(productCart); var cartPdtArrNew productCart.filter(function(el) { return el ! null && el ! ; }); // Send the data to the server using fetch fetch(update_cart_session.php, { method: POST, headers: { Content-Type: application/json, }, body: JSON.stringify(cartPdtArrNew) }) .then(response > response.json()) .then(data > { window.location cart; }) .catch((error) > { console.error(Error:, error); }); console.log(shoppingCart); //return; } else { $product.find(.error-message-main).after(div classerror-message stylefont-size:16px;>Product is Already Added in The Cart/div>); $product.find(.error-message).show(); } } // Initialize a single products functionality function initProduct($product, productId) { const productData getProductData(productId); const variations productData.variations.variations || ; const variantTypeCount Object.keys(productData.variations.variations).length; updateProductSessionData(productId, { isProductAttributes: variantTypeCount }); var product_id productData.id; var billing_model productData.billingModel; $data_product productData.index; // If productData has a category array, pick a random category $data_product_category productData.category ? productData.categoryMath.floor(Math.random() * productData.category.length).replace(/'/g, ) : ; // Fallback if no category exists $data_product_title productData.name; $data_product_alias ; $priceMin productData.ssPrice; if (productData.straightSaleMultiPrice yes && productData.billingModel 1){ $priceMin productData.shop_option.shop_option1.option_price; }else if(productData.billingModel 2 || productData.billingModel 6 || productData.billingModel 7 || productData.billingModel 8){ $priceMin productData.trialPrice; }else if(productData.billingModel 3){ $priceMin productData.continuityPrice; } if (billing_model 1) { $data_product_price $priceMin ; } if (billing_model 2 || billing_model 8) { $data_product_price productData.trialShipping; } if (billing_model 3) { let cntntyprice productData.continuityPrice; let cntntyshipping productData.continuityShipping; $data_product_price_cont +cntntyprice + +cntntyshipping; $data_product_price $data_product_price_cont.toFixed(2); } if (billing_model 4) { $data_product_price productData.trialShipping; } if (billing_model 5) { $data_product_price $priceMin; } if (billing_model 6) { $data_product_price productData.trialShipping; } if (billing_model 7) { $data_product_price $priceMin; } $data_product_shipping productData.ssShipping; $data_product_rbllprice productData.trialRebillPrice; $data_product_trlshipping productData.trialShipping; $data_product_cntntyprice productData.continuityPrice; $data_product_cntntyshipping productData.continuityShipping; $data_product_billing_model productData.billingModel; $data_product_size_option productData.sizeOption; $data_product_MultiPrice productData.straightSaleMultiPrice; $data_product_id $product.find(.pdt-button).data(product-id); // First pass the PHP path to JavaScript (put this in your template/header) var phpImagesPath ./config/images; // Then in your JavaScript code: $data_product_link productData.image.startsWith(http://) || productData.image.startsWith(https://) ? productData.image : phpImagesPath + / + productData.image; $data_product_qty $product.find(.pdt-button).data(product-quantity); updateProductSessionData(productId, { data_product: $data_product, data_product_category: $data_product_category, data_product_title: $data_product_title, data_product_alias: $data_product_alias, data_product_price: $data_product_price, data_product_shipping: $data_product_shipping, data_product_rbllprice: $data_product_rbllprice, data_product_trlshipping: $data_product_trlshipping, data_product_cntntyprice: $data_product_cntntyprice, data_product_cntntyshipping: $data_product_cntntyshipping, data_product_billing_model: $data_product_billing_model, data_product_size_option: $data_product_size_option, data_product_MultiPrice: $data_product_MultiPrice, data_product_id: $data_product_id, data_product_link: $data_product_link, data_pdt_qty: $data_product_qty, data_total_price: $data_product_price, data_product: $data_product, data_product_price_variant: }); $product.find(.single_pdt_cat).text($data_product_category); // Replace ' in product_category items before checking product_cat (productData.product_category && $data_product_category && productData.product_category.some(cat > cat.replace(/'/g, ) $data_product_category)) ? $data_product_category : ; if(product_cat ! ){ $(.product-category-bd).text(product_cat); }else{ $(.product-category-bd-sp).hide(); } var bill_model productData.billingModel; var multiPrice productData.straightSaleMultiPrice; var prod_id productData.id; // fetch pricing for ss dropdown and pass it to the next page if (bill_model 1 && multiPrice no) { var subPrice1 $product.find(.subtotal_price).text() * 1; var shipPrice1 $product.find(.shipping_price).text() * 1; updateProductSessionData(productId, { data_product_price: subPrice1, data_total_price: subPrice1 + shipPrice1, }); } if(bill_model 8){ $max_qty productData.trialMaxqty; $is_show_max_qty productData.trialMaxqty; }else{ $max_qty productData.maxQuantity; $is_show_max_qty productData.enableMaxqty; } //enable & disble qty in product & cart page depend on enableMaxqty key var max_qty $max_qty; var is_show_max_qty $is_show_max_qty; var productType productData.productType; var digitalFile productData.digitalFile; updateProductSessionData(productId, { data_product_enableMaxqty: max_qty, data_product_type_1: productType, data_product_digital_file: digitalFile, }); if (is_show_max_qty > 0) { $product.find(.select-qty-text).css(display, block); $product.find(.qty-col).css(display, flex); } var b_model productData.billingModel; var pdt_id productData.id; if (b_model 1) { $product.find(.bill_model).html(One Time Sale); } if (b_model 4) { $product.find(.pdt_type4).show(); $product.find(.bill_model).hide(); } if (b_model 5) { $product.find(.pdt_type5).show(); $product.find(.bill_model).hide(); } if (b_model 6) { $product.find(.pdt_type6).show(); $product.find(.bill_model).hide(); } if (b_model 7) { $product.find(.pdt_type7).show(); $product.find(.bill_model).hide(); } priceFixesAccordingToBilling($product,productId); setSaleType($product,productId); updateProductSessionData(productId, { data_product_selected_option: , }); fetchSizes($product,productId); fetchOptions($product,productId); $product.find(.increase).on(click, function() { handleQtyChange($product, productId, increase); }); $product.find(.decrease).on(click, function() { handleQtyChange($product, productId, decrease); }); setTimeout(function(){ var $mainSlider $product.find(.main-slider); var $thumbnailSlider $product.find(.thumbnail-slider); // Initialize main slider with reference to THIS products thumbnail slider $mainSlider.slick({ slidesToShow: 1, slidesToScroll: 1, arrows: true, fade: true, asNavFor: $thumbnailSlider // Pass the jQuery object directly }); // Initialize thumbnail slider with reference to THIS products main slider $thumbnailSlider.slick({ slidesToShow: 4, slidesToScroll: 1, asNavFor: $mainSlider, // Pass the jQuery object directly dots: false, centerMode: false, focusOnSelect: true }); $product.find(data-fancyboxgallery).fancybox({}); },1000); } // Helper function to remove product from sessionStorage function removeProductFromSessionStorage(productKey) { // 1. Get current data const storedData sessionStorage.getItem(productsData); if (!storedData) return; try { // 2. Parse and verify structure const productsData JSON.parse(storedData); if (typeof productsData ! object || Array.isArray(productsData)) { throw new Error(Expected an object, got something else); } // 3. Delete the key if it exists if (productsDataproductKey) { delete productsDataproductKey; // 4. Save back to sessionStorage sessionStorage.setItem(productsData, JSON.stringify(productsData)); console.log(Removed:, productKey); // Debug log } } catch (e) { console.error(Error updating sessionStorage:, e); } } /script>script srchttps://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js>/script>script srchttps://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.js>/script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]