{"id":33,"date":"2025-03-22T19:21:21","date_gmt":"2025-03-22T19:21:21","guid":{"rendered":"https:\/\/afraaboutique.com\/shop\/"},"modified":"2025-04-19T01:37:13","modified_gmt":"2025-04-19T01:37:13","slug":"shopping","status":"publish","type":"page","link":"https:\/\/afraaboutique.com\/ta\/shopping\/","title":{"rendered":"Shop"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"33\" class=\"elementor elementor-33\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4db0ce0 archive-body e-flex e-con-boxed e-con e-parent\" data-id=\"4db0ce0\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-357b7d2 elementor-widget elementor-widget-shortcode\" data-id=\"357b7d2\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n    <div class=\"shop-container\">\n        <form id=\"product-filters\" class=\"filter-sort\" action=\"\">\n            <div class=\"category-name\">\n                <h4>\n                                <\/h4>\n            <\/div>\n            <div class=\"filter-div\">\n                <div class=\"attribute-filter\">\n                                    <\/div>\n\n                <div class=\"sort-filter\">\n                    <select id=\"sort-products\" class=\"sort-dropdown\">\n                        <option value=\"menu_order\">Sort <\/option>\n                        <option value=\"date\">New In<\/option>\n                        <option value=\"price\">Low to High<\/option>\n                        <option value=\"price-desc\">High to Low<\/option>\n                    <\/select>\n                <\/div>\n            <\/div>\n        <input type=\"hidden\" name=\"trp-form-language\" value=\"ta\"\/><\/form>\n    <\/div>\n\n    <div id=\"filtered-products\"><\/div>\n    <div class=\"load-more-container\" style=\"display: none;\">\n        <button id=\"load-more\" data-page=\"1\">Load More<\/button>\n    <\/div>\n\n<script>\nfunction initProductSwipers() {\n    document.querySelectorAll('.swiper.product-gallery').forEach(function(swiperContainer) {\n        if (swiperContainer.classList.contains('swiper-initialized')) return;\n\n        new Swiper(swiperContainer, {\n            loop: true,\n            pagination: {\n                el: swiperContainer.querySelector('.swiper-pagination'),\n                clickable: true,\n            },\n            slidesPerView: 1,\n            spaceBetween: 10,\n        });\n\n        swiperContainer.classList.add('swiper-initialized');\n    });\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n    initProductSwipers();\n\n    const fetchProducts = (p = 1, append = false) => {\n        const form = document.getElementById(\"product-filters\");\n        const formData = new FormData(form);\n        formData.append(\"sort\", document.getElementById(\"sort-products\").value);\n        formData.append(\"page\", p);\n        formData.append(\"action\", \"filter_products\");\n        formData.append(\"current_url\", window.location.href);\n\n        fetch(\"https:\/\/afraaboutique.com\/wp-admin\/admin-ajax.php\", { method: \"POST\", body: formData })\n            .then(r => r.json())\n            .then(d => {\n                const grid = document.getElementById(\"filtered-products\");\n                const loadMoreBtn = document.getElementById(\"load-more\");\n                const loadMoreWrapper = document.querySelector(\".load-more-container\");\n            \n                if (!append) grid.innerHTML = '';\n            \n                if (d.products && d.products.trim() !== \"\") {\n                    grid.insertAdjacentHTML(\"beforeend\", d.products);\n            \n                    \/\/ Re-initialize swiper sliders for newly added products\n                    initProductSwipers();\n            \n                    if (d.current_page >= d.max_pages) {\n                        loadMoreWrapper.style.display = \"none\";\n                    } else {\n                        loadMoreWrapper.style.display = \"block\";\n                        loadMoreBtn.dataset.page = d.current_page;\n                    }\n                } else {\n                    grid.innerHTML = \"<p class='no-products'>Coming Soon<\/p>\";\n                    loadMoreWrapper.style.display = \"none\";\n                }\n            });\n\n    };\n\n    document.getElementById(\"product-filters\").addEventListener(\"change\", () => {\n        document.getElementById(\"load-more\").dataset.page = 1;\n        fetchProducts(1, false);\n    });\n\n    document.getElementById(\"sort-products\").addEventListener(\"change\", () => {\n        document.getElementById(\"load-more\").dataset.page = 1;\n        fetchProducts(1, false);\n    });\n\n    document.getElementById(\"load-more\").addEventListener(\"click\", function () {\n        const nextPage = +this.dataset.page + 1;\n        fetchProducts(nextPage, true);\n        this.dataset.page = nextPage;\n    });\n\n    fetchProducts();\n});\n<\/script>\n\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-72a6155 e-flex e-con-boxed e-con e-parent\" data-id=\"72a6155\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b081da5 elementor-widget elementor-widget-heading\" data-id=\"b081da5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">TRENDING NOW<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a5619cc elementor-widget elementor-widget-shortcode\" data-id=\"a5619cc\" data-element_type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">        <div class=\"category-slider-wrapper\">\n            <div class=\"swiper category-slider\">\n                <div class=\"swiper-wrapper\">\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/accessories\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2025\/11\/AF-NECK-FW23-01-1.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Accessories<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/bags\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2025\/06\/Sea-bag.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Bags<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/clothing\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2025\/09\/clothing-cat-img.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Clothing<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/frames\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2026\/01\/frame-cat-img.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Frames<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/perfume\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2025\/12\/afraa-perfum-5-2.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Perfume<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                            <div class=\"swiper-slide category-slide\">\n                            <a href=\"https:\/\/afraaboutique.com\/ta\/product-category\/shoes\/\" class=\"category-card\">\n                                <div class=\"category-image\" style=\"background-image: url('https:\/\/afraaboutique.com\/wp-content\/uploads\/2025\/11\/black-shoe-afraa.webp');\"><\/div>\n                                <div class=\"category-content\">\n                                    <h3>Shoes<\/h3>\n                                <\/div>\n                            <\/a>\n                        <\/div>\n                                    <\/div>\n                <div class=\"swiper-button-prev\"><\/div>\n                <div class=\"swiper-button-next\"><\/div>\n                <div class=\"swiper-pagination\"><\/div>\n            <\/div>\n        <\/div>\n\n        <script>\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n    var swiper = new Swiper(\".category-slider\", {\n        slidesPerView: 1, \/\/ default fallback for smallest screens\n        spaceBetween: 20,\n        loop: true,\n        autoplay: {\n            delay: 5000,\n        },\n        navigation: {\n            nextEl: \".swiper-button-next\",\n            prevEl: \".swiper-button-prev\",\n        },\n        breakpoints: {\n            640: {\n                slidesPerView: 2,\n            },\n            768: {\n                slidesPerView: 3,\n            },\n            1024: {\n                slidesPerView: 3,\n            }\n        }\n    });\n});\n<\/script>\n\n        <style>\n        .swiper-slide {\n            text-align: center;\n            overflow: hidden;\n        }\n        <\/style>\n        <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>TRENDING NOW<\/p>","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-33","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/pages\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/comments?post=33"}],"version-history":[{"count":12,"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/pages\/33\/revisions"}],"predecessor-version":[{"id":1568,"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/pages\/33\/revisions\/1568"}],"wp:attachment":[{"href":"https:\/\/afraaboutique.com\/ta\/wp-json\/wp\/v2\/media?parent=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}