Help
RSS
API
Feed
Maltego
Contact
Domain > colorspectrumsupply.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2026-01-16
104.21.5.76
(
ClassC
)
Port 80
HTTP/1.1 200 OKDate: Fri, 16 Jan 2026 16:58:42 GMTContent-Type: text/html; charsetUTF-8Transfer-Encoding: chunkedConnection: keep-aliveset-cookie: PHPSESSID85tc53dnnrlj02ue3ajdnib9sh; path/; secure; HttpOnly; SameSiteStrictexpires: 0cache-control: no-cache, no-store, must-revalidatepragma: no-cacheNel: {report_to:cf-nel,success_fraction:0.0,max_age:604800}Report-To: {group:cf-nel,max_age:604800,endpoints:{url:https://a.nel.cloudflare.com/report/v4?sM9%2BHhHsJlzy9g0WVOtCKltPmvujGWIIh8C1zZ8pYrX%2FaT%2FDv02sTkwjTq83XZ%2FZjWa5aislHI72gmmkYj%2By2%2BKxiAtJooCd8Ry34pmh80qX7eWIZbeq2}}vary: Originvary: accept-encodingserver: cloudflarex-powered-by: ASP.NETstrict-transport-security: max-age31536000; includeSubDomains; preloadx-content-type-options: nosniffx-frame-options: SAMEORIGINx-xss-protection: 1; modeblockreferrer-policy: strict-origin-when-cross-originaccess-control-allow-methods: GET, POST, OPTIONSaccess-control-allow-headers: Content-Type, Authorizationaccess-control-allow-credentials: trueedit: Set-Cookie ^(.*)$ $1; HttpOnly; SameSiteLaxx-turbo-charged-by: LiteSpeedcf-cache-status: DYNAMICCF-RAY: 9bef28bb8ada5d68-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>Color Spectrum Supply/title> link relstylesheet typetext/css href./config/css/bootstrap.min.css?v1768582722> link relstylesheet typetext/css hrefstyle.css?v1768582722> link hrefhttps://fonts.googleapis.com/icon?familyMaterial+Icons relstylesheet> 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?v1768582722 /> 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> script srchttps://cdn.tailwindcss.com>/script> script> tailwind.config { prefix: tw-, corePlugins: { preflight: false, // ← This disables Tailwinds CSS reset } } /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 class header_section72 idheader_section> header classnavbar-nav72 navtemplatesSec> div classprimary-navigation topbarRow1 nav-color> div classsection-max-width px-3 py-1> div classd-flex align-items-center stylejustify-content: space-between> button classnavbar-toggler menu-icon text-md nav-text-color d-block d-lg-none p-0 typebutton data-bs-togglecollapse data-bs-target#navbarsExample03 aria-controlsnavbarsExample03 aria-expandedfalse aria-labelToggle navigation stylewidth:auto;height:auto;> i classmaterial-icons>horizontal_split/i> /button> a classheader_brand nav-text-color text-md hrefindex.php> Color Spectrum Supply /a> ul classnavbar-nav cart-nav styleflex-direction:row; gap:14px;> li classnav-text-color d-none d-lg-flex> div class> div classcall-us align-items-center > div classinput-group> input typetext classform-control idsearchBarInput placeholderSearch aria-labelSearch aria-describedbybasic-addon1> div classinput-group-prepend> span classinput-group-text idbasic-addon1> button idsearch-product classborder-none > i classmaterial-icons>search/i> /button> /span> /div> div iditem-list> /div> /div> /div> /div> /li> li classcart_link > a hrefjavascript:void(0); classd-flex> div classcart-container> span classnav-icon-color text-md>i classmaterial-icons>shopping_bag/i> /span> span idcart_count classcart-count >/span> /div> span classcart_amt nav-text-color text-sm d-none> $ p idcart_amt classsubtotalAmount text-sm nav-text-color style-d-inline-navbar>/p> /span> /a> div classmini-cart-content navCart14> div classtopbarNavcart14> h2 classshoppingHead14 m-0 text-md>My Cart/h2> button classmini-cart-close text-lg>i classmaterial-icons>close/i>/button> /div> div classminicart_inner14> div classminicart_table table-responsive> table classtable minicart_details6 > tbody idminicartRow> tr classemptyRow>td padding: colspan3>p classcart_empty text-base>There are no items to review in your cart./p>/td>/tr> /tbody> /table> /div> /div> div classmini-cart-action14> 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: 45px;> View Cart /a> a hrefcheckout classbutton-primary w-50 mt-3 text-sm styledisplay: flex;justify-content: center;align-items: center;padding: 12px;min-height: 45px;> Check Out /a> /div> /div> /div> /li> /ul> /div> /div> /div> div class main2ndrow navtemplateBgwhite navbgcolor> div styleborder-top: 1px solid var(--neutral);border-bottom: 1px solid var(--neutral);> div classsection-max-width px-3 w-100 pb-0> div stylejustify-content:space-between;align-items:center> nav classnavbar navbar-expand-lg p-0 pb-1 > div classcollapse navbar-collapse idnavbarsExample03> ul classnavbar-nav mb-lg-0> li classnav-item active > a classnav-link navtemplateBgwhiteText linkcolors hrefindex.php> Main /a> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefshop> Commerce /a> /li> li classnav-item dropdown> a classnav-link navtemplateBgwhiteText linkcolors dropdown-toggle href# data-bs-toggledropdown aria-expandedfalse> Category List /a> ul classdropdown-menu> li classdropdown-item> a class hrefproduct-category/craft-supplies> Craft Supplies /a> /li> li classdropdown-item> a class hrefproduct-category/specialty-items> Specialty Items /a> /li> li classdropdown-item> a class hrefproduct-category/storage-&-organization> Storage & Organization /a> /li> /ul> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefcontact> Support /a> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefcart> Order Cart /a> /li> /ul> /div> /nav> /div> /div> /div> /div> /header> /section>div idHeroSection classtw-banner-section2 gwobcUyE dark-mode section-max-width tw-px-4 tw-overflow-hidden> div classtw-banner tw-flex overlay-background tw-relative tw-items-center lg:tw-min-h-670px tw-min-h-450px stylebackground-image: url(./img/8jLhioyz5DdfjdfTQDV6diygNx25QN500CeWTjAq.webp); background-size: cover; background-repeat: repeat-x; background-position: center 50%; > div classtw-container tw-mx-auto tw-px-4> div classtw-flex tw-flex-col tw-items-center tw-text-center> div classtw-head-title tw-text-white tw-min-h-400px lg:tw-w-670px tw-w-100% tw-mx-auto tw-flex tw-flex-col tw-items-center tw-justify-center tw-relative tw-z-2> div classtw-text-wrapper tw-relative tw-z-5> p classbanner-tagline text-base tw-inline-block neutral_text_color neutral_color tw-py-2 tw-px-6 tw-rounded-full tw-m-0 data-wow-duration.5s data-wow-delay1s>Exclusive Offer/p> /div> /div> /div> /div> /div>/div>section idaboutSection classabout03 gwobcUyE dark-mode section-max-width tw-overflow-hidden tw-px-4 > div classizXqxRKd> div> div classtw-flex tw-flex-wrap tw-m-0> div classtw-w-full md:tw-w-6/12 lg:tw-w-4/12 tw-p-0> div classtw-w-full tw-min-h-500px md:tw-min-h-500px max-767px:tw-min-h-350px tw-h-full tw-bg-cover tw-bg-no-repeat stylebackground-image: url(./img/l3IuzkmObQdc75vVEqqpej1G3J2L8Jp6eLlaS6yo.webp);> /div> /div> div classtw-w-full md:tw-w-6/12 lg:tw-w-8/12 tw-text-left tw-py-10 tw-px-14 tw-pr-0 max-991px:tw-py-6 max-991px:tw-px-8 max-991px:tw-pr-0 max-767px:tw-py-6 max-767px:tw-px-0> div> h2 classtext-xl tw-font-semibold>Fueled by Your Needs/h2> p classtext-base tw-mt-4>Welcome to our Online Store, where quality meets affordability. Shop with confidence, knowing youll get the best value./p> a hrefshop classbutton-primary tw-mt-4 text-sm tw-inline-block tw-py-3 tw-px-5 tw-min-h-50px tw-text-center tw-rounded-md>View Product/a> /div> /div> /div> /div> /div>/section>section classtw-pdt-section28 tw-overflow-hidden gwobcUyE section-max-width tw-px-4 idorder> div classtw-w-full izXqxRKd idrelated_prods> div classtw-text-center tw-mb-6> h3 classtext-xl tw-font-normal tw-text-#212529 tw-capitalize idshop>Shopping Essentials/h3> /div> div classswiper-containerp28 tw-overflow-hidden tw-relative tw-pb-8> div classswiper-wrapper> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index7 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-06T065527.274.webp altEasel Stand /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Easel Stand/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$10.95/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index3 data-product-idproduct-4> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T224004.675.webp altArt Supply Organizer Caddy /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Art Supply Organizer Caddy/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$15.28/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index2 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T223714.863.webp altBeading Kit /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Beading Kit/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$12.48/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index11 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T233455.711.webp altRuler and Compass /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Ruler and Compass/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$16.56/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index8 data-product-idproduct-2> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T004231.922.webp altCraft Scissors /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Craft Scissors/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$11.95/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_half/i> /span> /div> /div> /div> /div> /div> div classswiper-pagination tw-bottom--6px!> /div> /div> /div>/section>section class gwobcUyE section-max-width tw-px-4 tw-bg-transparent styleoverflow:hidden;> div class izXqxRKd tw-mx-auto tw-flex tw-justify-between tw-flex-wrap tw-gap-5> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span classtw-text-black tw-text-28px> i classmaterial-icons>pin_drop/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Shop Online/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>Our products are exlucsive to our website/p> /div> /div> div classtw-single-feature-item tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div classtw-feature-icon-container tw-text-center tw-mb-4> span class tw-text-black tw-text-28px> i classmaterial-icons>local_shipping/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Shipping Included/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>For all orders/p> /div> /div> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span classtw-text-black tw-text-28px> i classmaterial-icons>lock/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Protected Payments/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>Safe Shopping Guaranteed/p> /div> /div> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span class tw-text-black tw-text-28px> i classmaterial-icons>undo/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Hassle Free Returns/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>View Terms For Details/p> /div> /div> /div>/section>div idproductContainer>/div>div classcta-section42 position-relative gwobcUyE section-max-width tw-px-4 tw-z-1 idCTASection styleoverflow:hidden;> div classcontain izXqxRKd tw-mx-auto> div classcta-data tw-flex tw-relative tw-bg-white tw-border-t-8px tw-border-b-0px tw-border-l-0px tw-border-r-0px tw-border-solid tw-shadow-0_18px_90px_rgba(0,0,0,0.03) hover:tw-shadow-0_1rem_2.5rem_rgba(0,0,0,0.08) tw-py-16px tw-px-70px max-991px:tw-px-20px max-767px:tw-px-10px styleborder-color: var(--primary);> div classcta-data-box tw-z-99 tw-flex tw-justify-between tw-items-center tw-w-full max-991px:tw-flex-col max-991px:tw-items-start tw-gap-10px> div classtitle-des tw-w-70% max-991px:tw-w-full> h2 classtitle text-xl tw-text-#000 tw-font-bold tw-mb-15px>Add to your favorites now/h2> p classdesc text-md tw-text-#000 tw-font-normal>Let the Browsing Begin/p> /div> div classbutton-div> a hrefshop.php classbutton-primary text-sm tw-inline-block tw-z-99 tw-py-14px tw-px-34px tw-min-h-40px tw-text-center tw-w-auto>Browse Our Collection/a> /div> /div> /div> /div>/div>footer classtw-footer31 footer-background-color tw-py-6 lg:tw-py-10 tw-bg-gradient-to-b tw-transition-all tw-duration-500 idfooter> div classsection-max-width tw-px-4> div class tw-border-solid tw-border-x-0 tw-border-t-0 tw-border-b tw-pb-5 tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-10> div classtw-group> h5 class brand text-md tw-font-bold tw-mb-2>Color Spectrum Supply/h5> p class text-base tw-opacity-80>Kevinstinct Digital Inc/p> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>CONTACT US/h5> ul class tw-space-y-3> li classtw-flex tw-items-start tw-gap-3> span class text-md tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>chat/i> /span> div class text-base>Live Chat br>8 am to 5 pm | Monday - Friday/div> /li> li classtw-flex tw-items-start tw-gap-3> span class text-md tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>mail/i> /span> div class style-1-alias-footer-content text-base tw-break-words>a href/cdn-cgi/l/email-protection class__cf_email__ data-cfemaile3909693938c9197a3808c8f8c91909386809791968e909693938f9acd808c8e>email protected/a>/div> /li> li classtw-flex tw-items-start tw-gap-3> span class text-base tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>call/i> /span> div class text-base>(866) 359-3589/div> /li> /ul> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>SUPPORT/h5> ul classtw-space-y-1> li> a class text-base tw-relative tw-inline-block tw-underline after:tw-duration-300 hrefcontact>Get In Touch/a> /li> /ul> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>ABOUT/h5> ul classtw-space-y-1> li class> a classtext-base hrefindex.php>Main/a> /li> li class> a classtext-base hrefcontact>Get In Touch/a> /li> li class> a classtext-base hrefterms>Terms Statement/a> /li> li class> a classtext-base hrefprivacy>Privacy Protection/a> /li> /ul> /div> /div> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-items-center tw-mt-6 tw-gap-6> div classtw-flex tw-flex-wrap tw-gap-x-4 tw-text-base> a classlinkSpace tw-relative tw-underline styletext-decoration: underline !important; hrefterms>Terms Statement/a> a classlinkSpace tw-relative tw-underline styletext-decoration: underline !important; hrefprivacy>Privacy Protection/a> /div> div classtw-text-start lg:tw-text-right> div classfooter-cc tw-flex tw-flex-wrap tw-justify-end tw-gap-3> img classtw-h-auto tw-object-contain tw-transition-transform tw-duration-300 hover:tw-scale-110 src./config/images/payment/O7nDlDLfrEaS0MAW8nqQAyHsQRfKEFSy7HtJz16M.webp> img classtw-h-auto tw-object-contain tw-transition-transform tw-duration-300 hover:tw-scale-110 src./config/images/payment/BSSUD2leOqqOHvxDvZFhmaZjTOSmFFUlk5IQklL3.webp> /div> /div> /div> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-items-center tw-mt-4 tw-gap-6> div> p classtw-mb-0 text-base tw-opacity-80>© 2026 Color Spectrum Supply. All Rights Reserved/p> /div> div classtw-text-start lg:tw-text-right> p classtw-mb-0 text-base tw-break-words tw-opacity-80>10272 Arundel Ave, Westminster, California, 92683, USA/p> /div> /div> /div>/footer> div idmarketingPopup classemailpop3 tw-fixed tw-inset-0 tw-bg-rgba(0,0,0,0.7) tw-z-9999 tw-flex tw-items-start tw-justify-center tw-pt-14 tw-cursor-pointer tw-px-4 tw-hidden> div classtw-fixed tw-inset-0 tw-bg-black tw-opacity-50 data-dismissmodal> /div> div classtw-w-full tw-max-w-1000px tw-bg-white tw-rounded tw-relative tw-overflow-hidden tw-cursor-default> button typebutton classclosebtn tw-absolute tw-top-6 tw-right-4 tw-border-0 tw-bg-transparent tw-border-b-2 tw-border-black text-md data-dismissmodal aria-labelClose> span> i classmaterial-icons>close/i> /span> /button> div classtw-w-full tw-flex tw-flex-col lg:tw-flex-row tw-p-0> div classtw-hidden lg:tw-block tw-flex-shrink-0 tw-w-1/2> div classimagBackground tw-w-full tw-h-full tw-min-h-580px tw-bg-cover tw-bg-center stylebackground-image: url(./img/);> /div> /div> div classrightContainer tw-w-full lg:tw-w-1/2 tw-flex tw-flex-col tw-justify-center tw-items-start tw-min-h-fit lg:tw-min-h-500px tw-px-5% tw-py-2%> div classinnerdiv1 tw-w-full> h1 classtitleContents text-xl tw-font-bold tw-text-black tw-mb-8 tw-capitalize>Subscribe for Exclusive Offers!/h1> p idbtn1 classtext-md tw-text-#333 tw-mb-16 tw-capitalize tw-cursor-pointer>Sign up to receive updates on our latest products and special promotions./p> form class tw-relative tw-pt-12 idmarketingPopupForm> div classtw-w-full> input typeemail idemail required classemailinput tw-w-full tw-h-46px tw-bg-transparent tw-border-0 tw-border-b tw-border-black tw-rounded-none text-base tw-mb-6 placeholderEnter your email address> span classerror-email tw-text-red-600 text-base tw-hidden>Email is required/span> /div> button typesubmit idsaveButton classbutton-primary tw-inline-block tw-mb-2 text-sm tw-py-3 tw-px-5 tw-min-h-40px tw-rounded>Subscribe Now/button> /form> /div> /div> /div> /div>/div> div idCookieBanner classtw-fixed tw-bottom-8 tw-right-0 lg:tw-left-20 tw-bg-white tw-w-90% lg:tw-w-75% tw-rounded-lg tw-shadow-0_0_18px_rgba(0,0,0,0.2) tw-z-2147483645 tw-py-5 tw-grid tw-gap-4 > button onclickrejectCookies() classtw-absolute tw-top-2 tw-right-3 text-md tw-bg-transparent tw-text-gray-500 hover:tw-text-gray-700 tw-border-none tw-cursor-pointer> i classmaterial-icons>close/i> /button> div idcookie-template-21-onetrust-cookie-btn-container classtw-hidden md:tw-block tw-absolute tw-left--35px tw-top-1/2 tw--translate-y-1/2 tw-z-2> button classtw-rounded-full tw-h-16 tw-w-16 tw-p-0 tw-border-0 tw-cursor-pointer> svg width65 height65 viewBox-2 -2 35 35 xmlnshttp://www.w3.org/2000/svg> g fillnone fill-ruleevenodd> circle cx15 cy15 r16.5 fill#2e3643> /circle> circle cx15 cy15 r14.5 fill#fff> /circle> circle cx15 cy15 r14 fill#2e3643> /circle> path dM25 14.95V15c0 5.523-4.477 10-10 10S5 20.523 5 15c0-4.842 3.442-8.881 8.013-9.803A3.5 3.5 0 0 0 16.13 8.98a4 4 0 0 0 6.025 4.39A2.501 2.501 0 0 0 25 14.95z stroke#323F4E stroke-width.5 fill#FFF> /path> circle fill#BDBDBD cx10 cy12 r2> /circle> circle fill#BDBDBD cx12.5 cy19.5 r1.5> /circle> circle fill#BDBDBD cx20 cy18 r2> /circle> circle fill#6CC04A cx14 cy14 r1> /circle> circle fill#6CC04A cx17 cy22 r1> /circle> circle fill#6CC04A cx9 cy18 r1> /circle> /g> /svg> /button> /div> div classtw-w-full tw-max-w-full tw-px-5> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-12 tw-gap-6 tw-items-center> div classtw-col-span-1 lg:tw-col-span-8 lg:tw-pl-8> h2 classtext-lg tw-font-semibold tw-text-#2c3643 tw-mb-2>Our Site Cookies/h2> p classtext-base tw-m-0 tw-text-#2c3643>We use cookies to track visitor behavior, store preferences, and ensure secure logins. Additionally, cookies allow us to deliver personalized ads and content tailored to your interests. By accepting, you agree to the use of cookies in accordance with our Cookie Policy, which provides comprehensive details on how we use cookies, share data with third parties, and manage your cookie preferences./p> /div> div classtw-col-span-1 lg:tw-col-span-4 tw-flex tw-justify-center lg:tw-justify-end tw-items-center tw-gap-6 tw-mt-4 lg:tw-mt-0> button classbutton-primary text-sm tw-min-w-160px tw-py-3 tw-rounded-full tw-shadow-0px_2px_10px_-3px_#999 onclickacceptCookies()>Accept Cookies/button> /div> /div> /div>/div> 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?familyRoboto:ital,wght@0,100..900;1,100..900&displayswap);/style>style>@import url(https://fonts.googleapis.com/css2?familyOswald:wght@200..700&displayswap);/style>style> *{ font-family: Roboto, sans-serif; } h1, h2, h3, h4, h5, h6 { font-family: Oswald, sans-serif; }/style> div class tw-fixed tw-bottom-30px tw-left-30px tw-z-1050> div idProductNotificationBanner classproduct-notification-section tw-flex tw-items-center tw-bg-white tw-w-320px tw-h-120px tw-shadow-md tw-opacity-95 tw-transition-opacity tw-duration-300 hover:tw-opacity-100 tw-relative tw-py-25px tw-pr-25px tw-pl-15px tw-rounded-lg tw-gap-3> button classclose-product-notification tw-absolute tw-top-10px tw-right-10px tw-bg-transparent tw-border-none tw-text-black tw-cursor-pointer tw-text-md onclickcloseProductNotification2()> i classmaterial-icons>close/i> /button> div class tw-flex-shrink-0 tw-mr-15px> img src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T233658.701.webp altLeather Stamping Tools classtw-w-85px tw-h-80px tw-object-cover tw-rounded-md /> /div> div class tw-flex-1> p classtw-text-black text-base>Someone purchased a a hrefproduct/leather-stamping-tools classtw-text-black hover:tw-text-black tw-font-semibold text-base hover:tw-underline tw-no-underline>Leather Stamping Tools/a> /p> /div> /div>/div> 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> function productNotification() { var payload { method: productNotification, } $.ajax({ url: config/function.php, type: POST, dataType: json, data: { payload: payload }, success: function(response) { console.log(response.dataresponse.dataresponse.data,response.data); $(#ProductNotificationBanner).html(response.data); $(#ProductNotificationBanner).show(); }, error: function(xhr, status, error) { console.error(xhr.responseText); } }); setTimeout(function() { $(#ProductNotificationBanner).hide(); }, 5000); } // Generate a random interval in milliseconds between min and max seconds function getRandomInterval(minSeconds, maxSeconds) { return Math.floor(Math.random() * (maxSeconds - minSeconds + 1) + minSeconds) * 1000; } // Recursive function to start and keep showing notifications at random intervals function showNotificationWithRandomIntervals() { // Show notification and calculate the next random interval productNotification(); // Schedule the next notification after a random time between 7 and 10 seconds var nextInterval getRandomInterval(12, 15); setTimeout(showNotificationWithRandomIntervals, nextInterval); } var initialInterval getRandomInterval(3, 7); setTimeout(showNotificationWithRandomIntervals, initialInterval); /script>script> const productsPerPage 6; 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 button; // 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 button; 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 button; 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 button; 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(inline inline){ $product.find(.error-message-attr).append(div classerror-message stylefont-size:16px;>+errorMsg+/div>); }else if(inline popup){ $(#error_pop).append(errorMessageVariable.replace(errorMessageVariable, errorMsg)); } } } if(inline inline){ $product.find(.error-message).show(); }else if(inline 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 button; 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 13; 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 > { if( product){ if(inline popup){ $(.cart-item-img).attr(src,data.image); $(.cart-item-qty).html(data.qty); $(.cart-item-price).html(data.price); $(.cart-sub-total).html(data.cartTotal); $(.cartTotalItem).html(data.cartCount); $(.cart-item-name).html(data.name); $(#cartModal).removeClass(tw-hidden); }else if(inline inline){ $(.cart-alert-message).html(data.cartMessage); $(.cart-alert).show(); } else{ window.location cart; } }else{ 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); } } document.querySelectorAll(data-bs-dismissmodal).forEach(element > { element.addEventListener(click, function() { document.getElementById(cartModal).classList.add(tw-hidden); }); }); /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>
Port 443
HTTP/1.1 200 OKDate: Fri, 16 Jan 2026 16:58:42 GMTContent-Type: text/html; charsetUTF-8Transfer-Encoding: chunkedConnection: keep-aliveSet-Cookie: PHPSESSIDmuusa2jsrptpf6nd99umrh2r3a; path/; secure; HttpOnly; SameSiteStrictexpires: 0Cache-Control: no-cache, no-store, must-revalidatepragma: no-cacheReport-To: {group:cf-nel,max_age:604800,endpoints:{url:https://a.nel.cloudflare.com/report/v4?sGIMw2mhZTOZJihWifpF0cLiW5sGVIAuDChGAvEpCW1hDVhJoLlO3%2BRoeKro3htnD5Hzgpn5vU1Jt88DaNsuk7OP7he%2BYDsGryUQtgXJApIpTJWXpHQ%3D%3D}}vary: Originvary: accept-encodingServer: cloudflarex-powered-by: ASP.NETstrict-transport-security: max-age31536000; includeSubDomains; preloadx-content-type-options: nosniffx-frame-options: SAMEORIGINx-xss-protection: 1; modeblockreferrer-policy: strict-origin-when-cross-originaccess-control-allow-methods: GET, POST, OPTIONSaccess-control-allow-headers: Content-Type, Authorizationaccess-control-allow-credentials: trueedit: Set-Cookie ^(.*)$ $1; HttpOnly; SameSiteStrictedit: Set-Cookie ^(.*)$ $1; HttpOnly; SameSiteLaxx-turbo-charged-by: LiteSpeedcf-cache-status: DYNAMICNel: {report_to:cf-nel,success_fraction:0.0,max_age:604800}CF-RAY: 9bef28be2d27fef5-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>Color Spectrum Supply/title> link relstylesheet typetext/css href./config/css/bootstrap.min.css?v1768582722> link relstylesheet typetext/css hrefstyle.css?v1768582722> link hrefhttps://fonts.googleapis.com/icon?familyMaterial+Icons relstylesheet> 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?v1768582722 /> 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> script srchttps://cdn.tailwindcss.com>/script> script> tailwind.config { prefix: tw-, corePlugins: { preflight: false, // ← This disables Tailwinds CSS reset } } /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 class header_section72 idheader_section> header classnavbar-nav72 navtemplatesSec> div classprimary-navigation topbarRow1 nav-color> div classsection-max-width px-3 py-1> div classd-flex align-items-center stylejustify-content: space-between> button classnavbar-toggler menu-icon text-md nav-text-color d-block d-lg-none p-0 typebutton data-bs-togglecollapse data-bs-target#navbarsExample03 aria-controlsnavbarsExample03 aria-expandedfalse aria-labelToggle navigation stylewidth:auto;height:auto;> i classmaterial-icons>horizontal_split/i> /button> a classheader_brand nav-text-color text-md hrefindex.php> Color Spectrum Supply /a> ul classnavbar-nav cart-nav styleflex-direction:row; gap:14px;> li classnav-text-color d-none d-lg-flex> div class> div classcall-us align-items-center > div classinput-group> input typetext classform-control idsearchBarInput placeholderSearch aria-labelSearch aria-describedbybasic-addon1> div classinput-group-prepend> span classinput-group-text idbasic-addon1> button idsearch-product classborder-none > i classmaterial-icons>search/i> /button> /span> /div> div iditem-list> /div> /div> /div> /div> /li> li classcart_link > a hrefjavascript:void(0); classd-flex> div classcart-container> span classnav-icon-color text-md>i classmaterial-icons>shopping_bag/i> /span> span idcart_count classcart-count >/span> /div> span classcart_amt nav-text-color text-sm d-none> $ p idcart_amt classsubtotalAmount text-sm nav-text-color style-d-inline-navbar>/p> /span> /a> div classmini-cart-content navCart14> div classtopbarNavcart14> h2 classshoppingHead14 m-0 text-md>My Cart/h2> button classmini-cart-close text-lg>i classmaterial-icons>close/i>/button> /div> div classminicart_inner14> div classminicart_table table-responsive> table classtable minicart_details6 > tbody idminicartRow> tr classemptyRow>td padding: colspan3>p classcart_empty text-base>There are no items to review in your cart./p>/td>/tr> /tbody> /table> /div> /div> div classmini-cart-action14> 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: 45px;> View Cart /a> a hrefcheckout classbutton-primary w-50 mt-3 text-sm styledisplay: flex;justify-content: center;align-items: center;padding: 12px;min-height: 45px;> Check Out /a> /div> /div> /div> /li> /ul> /div> /div> /div> div class main2ndrow navtemplateBgwhite navbgcolor> div styleborder-top: 1px solid var(--neutral);border-bottom: 1px solid var(--neutral);> div classsection-max-width px-3 w-100 pb-0> div stylejustify-content:space-between;align-items:center> nav classnavbar navbar-expand-lg p-0 pb-1 > div classcollapse navbar-collapse idnavbarsExample03> ul classnavbar-nav mb-lg-0> li classnav-item active > a classnav-link navtemplateBgwhiteText linkcolors hrefindex.php> Main /a> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefshop> Commerce /a> /li> li classnav-item dropdown> a classnav-link navtemplateBgwhiteText linkcolors dropdown-toggle href# data-bs-toggledropdown aria-expandedfalse> Category List /a> ul classdropdown-menu> li classdropdown-item> a class hrefproduct-category/craft-supplies> Craft Supplies /a> /li> li classdropdown-item> a class hrefproduct-category/specialty-items> Specialty Items /a> /li> li classdropdown-item> a class hrefproduct-category/storage-&-organization> Storage & Organization /a> /li> /ul> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefcontact> Support /a> /li> li classnav-item > a classnav-link navtemplateBgwhiteText linkcolors hrefcart> Order Cart /a> /li> /ul> /div> /nav> /div> /div> /div> /div> /header> /section>div idHeroSection classtw-banner-section2 gwobcUyE dark-mode section-max-width tw-px-4 tw-overflow-hidden> div classtw-banner tw-flex overlay-background tw-relative tw-items-center lg:tw-min-h-670px tw-min-h-450px stylebackground-image: url(./img/8jLhioyz5DdfjdfTQDV6diygNx25QN500CeWTjAq.webp); background-size: cover; background-repeat: repeat-x; background-position: center 50%; > div classtw-container tw-mx-auto tw-px-4> div classtw-flex tw-flex-col tw-items-center tw-text-center> div classtw-head-title tw-text-white tw-min-h-400px lg:tw-w-670px tw-w-100% tw-mx-auto tw-flex tw-flex-col tw-items-center tw-justify-center tw-relative tw-z-2> div classtw-text-wrapper tw-relative tw-z-5> p classbanner-tagline text-base tw-inline-block neutral_text_color neutral_color tw-py-2 tw-px-6 tw-rounded-full tw-m-0 data-wow-duration.5s data-wow-delay1s>Exclusive Offer/p> /div> /div> /div> /div> /div>/div>section idaboutSection classabout03 gwobcUyE dark-mode section-max-width tw-overflow-hidden tw-px-4 > div classizXqxRKd> div> div classtw-flex tw-flex-wrap tw-m-0> div classtw-w-full md:tw-w-6/12 lg:tw-w-4/12 tw-p-0> div classtw-w-full tw-min-h-500px md:tw-min-h-500px max-767px:tw-min-h-350px tw-h-full tw-bg-cover tw-bg-no-repeat stylebackground-image: url(./img/l3IuzkmObQdc75vVEqqpej1G3J2L8Jp6eLlaS6yo.webp);> /div> /div> div classtw-w-full md:tw-w-6/12 lg:tw-w-8/12 tw-text-left tw-py-10 tw-px-14 tw-pr-0 max-991px:tw-py-6 max-991px:tw-px-8 max-991px:tw-pr-0 max-767px:tw-py-6 max-767px:tw-px-0> div> h2 classtext-xl tw-font-semibold>Fueled by Your Needs/h2> p classtext-base tw-mt-4>Welcome to our Online Store, where quality meets affordability. Shop with confidence, knowing youll get the best value./p> a hrefshop classbutton-primary tw-mt-4 text-sm tw-inline-block tw-py-3 tw-px-5 tw-min-h-50px tw-text-center tw-rounded-md>View Product/a> /div> /div> /div> /div> /div>/section>section classtw-pdt-section28 tw-overflow-hidden gwobcUyE section-max-width tw-px-4 idorder> div classtw-w-full izXqxRKd idrelated_prods> div classtw-text-center tw-mb-6> h3 classtext-xl tw-font-normal tw-text-#212529 tw-capitalize idshop>Shopping Essentials/h3> /div> div classswiper-containerp28 tw-overflow-hidden tw-relative tw-pb-8> div classswiper-wrapper> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index11 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T233455.711.webp altRuler and Compass /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Ruler and Compass/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$16.56/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index7 data-product-idproduct-2> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-06T065527.274.webp altEasel Stand /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Easel Stand/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$10.95/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index1 data-product-idproduct-4> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T223529.023.webp altEmbroidery Hoop Kit /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Embroidery Hoop Kit/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$10.95/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index2 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T223714.863.webp altBeading Kit /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Beading Kit/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$12.48/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> /div> /div> /div> /div> div classswiper-slide> div classproduct-section tw-product-block tw-relative tw-flex tw-flex-col tw-transition tw-duration-300 tw-overflow-hidden data-product-index9 data-product-idproduct-1> div classtw-relative tw-overflow-hidden tw-rounded-md> img classtw-w-full tw-aspect-square tw-object-cover tw-object-center src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-07T232815.954.webp altMicro-Tip Fabric Scissors /> div classtw-buttondiv28 tw-absolute tw-bottom-10px tw-right-10px tw-transition-all tw-duration-300> a hrefjavascript:void(0); idbtn_shop> button classbtn_shop shop-btn-color tw-w-35px tw-h-35px tw-rounded-md tw-flex tw-items-center tw-justify-center text-base tw-transition> i classmaterial-icons>shopping_bag/i> /button> /a> /div> /div> div classtw-pt-3> div classtw-flex tw-justify-between tw-items-center tw-gap-2 tw-px-1> h5 classtw-font-normal tw-text-#212529 text-base tw-capitalize>Micro-Tip Fabric Scissors/h5> p classtw-prod_price28 tw-font-semibold tw-text-black text-base tw-transition-all tw-duration-300> span>$15.35/span> /p> /div> div classtw-flex tw-justify-center tw-items-center tw-pt-2> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star/i> /span> span classstar> i classmaterial-icons>star_border/i> /span> /div> /div> /div> /div> /div> div classswiper-pagination tw-bottom--6px!> /div> /div> /div>/section>section class gwobcUyE section-max-width tw-px-4 tw-bg-transparent styleoverflow:hidden;> div class izXqxRKd tw-mx-auto tw-flex tw-justify-between tw-flex-wrap tw-gap-5> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span classtw-text-black tw-text-28px> i classmaterial-icons>pin_drop/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Shop Online/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>Our products are exlucsive to our website/p> /div> /div> div classtw-single-feature-item tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div classtw-feature-icon-container tw-text-center tw-mb-4> span class tw-text-black tw-text-28px> i classmaterial-icons>local_shipping/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Shipping Included/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>For all orders/p> /div> /div> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span classtw-text-black tw-text-28px> i classmaterial-icons>lock/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Protected Payments/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>Safe Shopping Guaranteed/p> /div> /div> div class tw-flex tw-flex-col tw-items-center tw-text-center lg:tw-basis-calc(25%-15px) md:tw-basis-48% tw-basis-full> div class tw-text-center tw-mb-4> span class tw-text-black tw-text-28px> i classmaterial-icons>undo/i> /span> /div> div> h4 class text-md tw-font-bold tw-leading-120% tw-text-black>Hassle Free Returns/h4> p class text-base tw-font-normal tw-leading-120% tw-text-black>View Terms For Details/p> /div> /div> /div>/section>div idproductContainer>/div>div classcta-section42 position-relative gwobcUyE section-max-width tw-px-4 tw-z-1 idCTASection styleoverflow:hidden;> div classcontain izXqxRKd tw-mx-auto> div classcta-data tw-flex tw-relative tw-bg-white tw-border-t-8px tw-border-b-0px tw-border-l-0px tw-border-r-0px tw-border-solid tw-shadow-0_18px_90px_rgba(0,0,0,0.03) hover:tw-shadow-0_1rem_2.5rem_rgba(0,0,0,0.08) tw-py-16px tw-px-70px max-991px:tw-px-20px max-767px:tw-px-10px styleborder-color: var(--primary);> div classcta-data-box tw-z-99 tw-flex tw-justify-between tw-items-center tw-w-full max-991px:tw-flex-col max-991px:tw-items-start tw-gap-10px> div classtitle-des tw-w-70% max-991px:tw-w-full> h2 classtitle text-xl tw-text-#000 tw-font-bold tw-mb-15px>Add to your favorites now/h2> p classdesc text-md tw-text-#000 tw-font-normal>Let the Browsing Begin/p> /div> div classbutton-div> a hrefshop.php classbutton-primary text-sm tw-inline-block tw-z-99 tw-py-14px tw-px-34px tw-min-h-40px tw-text-center tw-w-auto>Browse Our Collection/a> /div> /div> /div> /div>/div>footer classtw-footer31 footer-background-color tw-py-6 lg:tw-py-10 tw-bg-gradient-to-b tw-transition-all tw-duration-500 idfooter> div classsection-max-width tw-px-4> div class tw-border-solid tw-border-x-0 tw-border-t-0 tw-border-b tw-pb-5 tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-10> div classtw-group> h5 class brand text-md tw-font-bold tw-mb-2>Color Spectrum Supply/h5> p class text-base tw-opacity-80>Kevinstinct Digital Inc/p> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>CONTACT US/h5> ul class tw-space-y-3> li classtw-flex tw-items-start tw-gap-3> span class text-md tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>chat/i> /span> div class text-base>Live Chat br>8 am to 5 pm | Monday - Friday/div> /li> li classtw-flex tw-items-start tw-gap-3> span class text-md tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>mail/i> /span> div class style-1-alias-footer-content text-base tw-break-words>a href/cdn-cgi/l/email-protection class__cf_email__ data-cfemail8efdfbfefee1fcfaceede1e2e1fcfdfeebedfafcfbe3fdfbfefee2f7a0ede1e3>email protected/a>/div> /li> li classtw-flex tw-items-start tw-gap-3> span class text-base tw-transition-transform tw-duration-300 group-hover:tw-translate-y--2px> i classmaterial-icons>call/i> /span> div class text-base>(866) 359-3589/div> /li> /ul> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>SUPPORT/h5> ul classtw-space-y-1> li> a class text-base tw-relative tw-inline-block tw-underline after:tw-duration-300 hrefcontact>Get In Touch/a> /li> /ul> /div> div classtw-group> h5 class text-md tw-font-bold tw-mb-2>ABOUT/h5> ul classtw-space-y-1> li class> a classtext-base hrefindex.php>Main/a> /li> li class> a classtext-base hrefcontact>Get In Touch/a> /li> li class> a classtext-base hrefterms>Terms Statement/a> /li> li class> a classtext-base hrefprivacy>Privacy Protection/a> /li> /ul> /div> /div> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-items-center tw-mt-6 tw-gap-6> div classtw-flex tw-flex-wrap tw-gap-x-4 tw-text-base> a classlinkSpace tw-relative tw-underline styletext-decoration: underline !important; hrefterms>Terms Statement/a> a classlinkSpace tw-relative tw-underline styletext-decoration: underline !important; hrefprivacy>Privacy Protection/a> /div> div classtw-text-start lg:tw-text-right> div classfooter-cc tw-flex tw-flex-wrap tw-justify-end tw-gap-3> img classtw-h-auto tw-object-contain tw-transition-transform tw-duration-300 hover:tw-scale-110 src./config/images/payment/O7nDlDLfrEaS0MAW8nqQAyHsQRfKEFSy7HtJz16M.webp> img classtw-h-auto tw-object-contain tw-transition-transform tw-duration-300 hover:tw-scale-110 src./config/images/payment/BSSUD2leOqqOHvxDvZFhmaZjTOSmFFUlk5IQklL3.webp> /div> /div> /div> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-items-center tw-mt-4 tw-gap-6> div> p classtw-mb-0 text-base tw-opacity-80>© 2026 Color Spectrum Supply. All Rights Reserved/p> /div> div classtw-text-start lg:tw-text-right> p classtw-mb-0 text-base tw-break-words tw-opacity-80>10272 Arundel Ave, Westminster, California, 92683, USA/p> /div> /div> /div>/footer> div idmarketingPopup classemailpop3 tw-fixed tw-inset-0 tw-bg-rgba(0,0,0,0.7) tw-z-9999 tw-flex tw-items-start tw-justify-center tw-pt-14 tw-cursor-pointer tw-px-4 tw-hidden> div classtw-fixed tw-inset-0 tw-bg-black tw-opacity-50 data-dismissmodal> /div> div classtw-w-full tw-max-w-1000px tw-bg-white tw-rounded tw-relative tw-overflow-hidden tw-cursor-default> button typebutton classclosebtn tw-absolute tw-top-6 tw-right-4 tw-border-0 tw-bg-transparent tw-border-b-2 tw-border-black text-md data-dismissmodal aria-labelClose> span> i classmaterial-icons>close/i> /span> /button> div classtw-w-full tw-flex tw-flex-col lg:tw-flex-row tw-p-0> div classtw-hidden lg:tw-block tw-flex-shrink-0 tw-w-1/2> div classimagBackground tw-w-full tw-h-full tw-min-h-580px tw-bg-cover tw-bg-center stylebackground-image: url(./img/);> /div> /div> div classrightContainer tw-w-full lg:tw-w-1/2 tw-flex tw-flex-col tw-justify-center tw-items-start tw-min-h-fit lg:tw-min-h-500px tw-px-5% tw-py-2%> div classinnerdiv1 tw-w-full> h1 classtitleContents text-xl tw-font-bold tw-text-black tw-mb-8 tw-capitalize>Subscribe for Exclusive Offers!/h1> p idbtn1 classtext-md tw-text-#333 tw-mb-16 tw-capitalize tw-cursor-pointer>Sign up to receive updates on our latest products and special promotions./p> form class tw-relative tw-pt-12 idmarketingPopupForm> div classtw-w-full> input typeemail idemail required classemailinput tw-w-full tw-h-46px tw-bg-transparent tw-border-0 tw-border-b tw-border-black tw-rounded-none text-base tw-mb-6 placeholderEnter your email address> span classerror-email tw-text-red-600 text-base tw-hidden>Email is required/span> /div> button typesubmit idsaveButton classbutton-primary tw-inline-block tw-mb-2 text-sm tw-py-3 tw-px-5 tw-min-h-40px tw-rounded>Subscribe Now/button> /form> /div> /div> /div> /div>/div> div idCookieBanner classtw-fixed tw-bottom-8 tw-right-0 lg:tw-left-20 tw-bg-white tw-w-90% lg:tw-w-75% tw-rounded-lg tw-shadow-0_0_18px_rgba(0,0,0,0.2) tw-z-2147483645 tw-py-5 tw-grid tw-gap-4 > button onclickrejectCookies() classtw-absolute tw-top-2 tw-right-3 text-md tw-bg-transparent tw-text-gray-500 hover:tw-text-gray-700 tw-border-none tw-cursor-pointer> i classmaterial-icons>close/i> /button> div idcookie-template-21-onetrust-cookie-btn-container classtw-hidden md:tw-block tw-absolute tw-left--35px tw-top-1/2 tw--translate-y-1/2 tw-z-2> button classtw-rounded-full tw-h-16 tw-w-16 tw-p-0 tw-border-0 tw-cursor-pointer> svg width65 height65 viewBox-2 -2 35 35 xmlnshttp://www.w3.org/2000/svg> g fillnone fill-ruleevenodd> circle cx15 cy15 r16.5 fill#2e3643> /circle> circle cx15 cy15 r14.5 fill#fff> /circle> circle cx15 cy15 r14 fill#2e3643> /circle> path dM25 14.95V15c0 5.523-4.477 10-10 10S5 20.523 5 15c0-4.842 3.442-8.881 8.013-9.803A3.5 3.5 0 0 0 16.13 8.98a4 4 0 0 0 6.025 4.39A2.501 2.501 0 0 0 25 14.95z stroke#323F4E stroke-width.5 fill#FFF> /path> circle fill#BDBDBD cx10 cy12 r2> /circle> circle fill#BDBDBD cx12.5 cy19.5 r1.5> /circle> circle fill#BDBDBD cx20 cy18 r2> /circle> circle fill#6CC04A cx14 cy14 r1> /circle> circle fill#6CC04A cx17 cy22 r1> /circle> circle fill#6CC04A cx9 cy18 r1> /circle> /g> /svg> /button> /div> div classtw-w-full tw-max-w-full tw-px-5> div classtw-grid tw-grid-cols-1 lg:tw-grid-cols-12 tw-gap-6 tw-items-center> div classtw-col-span-1 lg:tw-col-span-8 lg:tw-pl-8> h2 classtext-lg tw-font-semibold tw-text-#2c3643 tw-mb-2>Our Site Cookies/h2> p classtext-base tw-m-0 tw-text-#2c3643>We use cookies to track visitor behavior, store preferences, and ensure secure logins. Additionally, cookies allow us to deliver personalized ads and content tailored to your interests. By accepting, you agree to the use of cookies in accordance with our Cookie Policy, which provides comprehensive details on how we use cookies, share data with third parties, and manage your cookie preferences./p> /div> div classtw-col-span-1 lg:tw-col-span-4 tw-flex tw-justify-center lg:tw-justify-end tw-items-center tw-gap-6 tw-mt-4 lg:tw-mt-0> button classbutton-primary text-sm tw-min-w-160px tw-py-3 tw-rounded-full tw-shadow-0px_2px_10px_-3px_#999 onclickacceptCookies()>Accept Cookies/button> /div> /div> /div>/div> 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?familyRoboto:ital,wght@0,100..900;1,100..900&displayswap);/style>style>@import url(https://fonts.googleapis.com/css2?familyOswald:wght@200..700&displayswap);/style>style> *{ font-family: Roboto, sans-serif; } h1, h2, h3, h4, h5, h6 { font-family: Oswald, sans-serif; }/style> div class tw-fixed tw-bottom-30px tw-left-30px tw-z-1050> div idProductNotificationBanner classproduct-notification-section tw-flex tw-items-center tw-bg-white tw-w-320px tw-h-120px tw-shadow-md tw-opacity-95 tw-transition-opacity tw-duration-300 hover:tw-opacity-100 tw-relative tw-py-25px tw-pr-25px tw-pl-15px tw-rounded-lg tw-gap-3> button classclose-product-notification tw-absolute tw-top-10px tw-right-10px tw-bg-transparent tw-border-none tw-text-black tw-cursor-pointer tw-text-md onclickcloseProductNotification2()> i classmaterial-icons>close/i> /button> div class tw-flex-shrink-0 tw-mr-15px> img src./config/images/products/182 PCS CAR FUSES ASSO - 2025-03-06T043013.542.webp altRolling Storage Cart classtw-w-85px tw-h-80px tw-object-cover tw-rounded-md /> /div> div class tw-flex-1> p classtw-text-black text-base>Someone purchased a a hrefproduct/rolling-storage-cart classtw-text-black hover:tw-text-black tw-font-semibold text-base hover:tw-underline tw-no-underline>Rolling Storage Cart/a> /p> /div> /div>/div> 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> function productNotification() { var payload { method: productNotification, } $.ajax({ url: config/function.php, type: POST, dataType: json, data: { payload: payload }, success: function(response) { console.log(response.dataresponse.dataresponse.data,response.data); $(#ProductNotificationBanner).html(response.data); $(#ProductNotificationBanner).show(); }, error: function(xhr, status, error) { console.error(xhr.responseText); } }); setTimeout(function() { $(#ProductNotificationBanner).hide(); }, 5000); } // Generate a random interval in milliseconds between min and max seconds function getRandomInterval(minSeconds, maxSeconds) { return Math.floor(Math.random() * (maxSeconds - minSeconds + 1) + minSeconds) * 1000; } // Recursive function to start and keep showing notifications at random intervals function showNotificationWithRandomIntervals() { // Show notification and calculate the next random interval productNotification(); // Schedule the next notification after a random time between 7 and 10 seconds var nextInterval getRandomInterval(12, 15); setTimeout(showNotificationWithRandomIntervals, nextInterval); } var initialInterval getRandomInterval(3, 7); setTimeout(showNotificationWithRandomIntervals, initialInterval); /script>script> const productsPerPage 6; 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 button; // 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 button; 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 button; 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 button; 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(inline inline){ $product.find(.error-message-attr).append(div classerror-message stylefont-size:16px;>+errorMsg+/div>); }else if(inline popup){ $(#error_pop).append(errorMessageVariable.replace(errorMessageVariable, errorMsg)); } } } if(inline inline){ $product.find(.error-message).show(); }else if(inline 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 button; 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 13; 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 > { if( product){ if(inline popup){ $(.cart-item-img).attr(src,data.image); $(.cart-item-qty).html(data.qty); $(.cart-item-price).html(data.price); $(.cart-sub-total).html(data.cartTotal); $(.cartTotalItem).html(data.cartCount); $(.cart-item-name).html(data.name); $(#cartModal).removeClass(tw-hidden); }else if(inline inline){ $(.cart-alert-message).html(data.cartMessage); $(.cart-alert).show(); } else{ window.location cart; } }else{ 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); } } document.querySelectorAll(data-bs-dismissmodal).forEach(element > { element.addEventListener(click, function() { document.getElementById(cartModal).classList.add(tw-hidden); }); }); /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
]