{"id":310,"date":"2026-09-22T04:55:29","date_gmt":"2026-09-22T01:55:29","guid":{"rendered":"https:\/\/bilssstore.com\/?page_id=310"},"modified":"2026-09-22T04:55:29","modified_gmt":"2026-09-22T01:55:29","slug":"wishlist","status":"publish","type":"page","link":"https:\/\/bilssstore.com\/?page_id=310","title":{"rendered":"\u0627\u0644\u0645\u0641\u0636\u0644\u0629"},"content":{"rendered":"\n    <section class=\"bilss-wishlist-page\">\n\n        <div class=\"bilss-wishlist-head\">\n            <span class=\"bilss-wishlist-eyebrow\">YOUR SELECTION<\/span>\n            <h1>\u0627\u0644\u0645\u0641\u0636\u0644\u0629<\/h1>\n            <p>\u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a \u0627\u0644\u062a\u064a \u0627\u062e\u062a\u0631\u062a\u0647\u0627 \u0644\u062a\u0639\u0648\u062f \u0625\u0644\u064a\u0647\u0627 \u0641\u064a \u0623\u064a \u0648\u0642\u062a.<\/p>\n        <\/div>\n\n        <div\n            id=\"bilss-wishlist-grid\"\n            class=\"bilss-wishlist-grid\">\n        <\/div>\n\n        <div\n            id=\"bilss-wishlist-empty\"\n            class=\"bilss-wishlist-empty\"\n            hidden>\n\n            <div class=\"bilss-wishlist-empty-icon\">\n                <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n                    <path d=\"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 0 0 0-7.78z\"><\/path>\n                <\/svg>\n            <\/div>\n\n            <h2>\u0627\u0644\u0645\u0641\u0636\u0644\u0629 \u0641\u0627\u0631\u063a\u0629<\/h2>\n\n            <p>\n                \u0644\u0645 \u062a\u0642\u0645 \u0628\u0625\u0636\u0627\u0641\u0629 \u0623\u064a \u0645\u0646\u062a\u062c\u0627\u062a \u0625\u0644\u0649 \u0627\u0644\u0645\u0641\u0636\u0644\u0629 \u062d\u062a\u0649 \u0627\u0644\u0622\u0646.\n            <\/p>\n\n            <a\n                href=\"https:\/\/bilssstore.com\/?page_id=7\"\n                class=\"bilss-wishlist-shop-btn\">\n                \u062a\u0635\u0641\u062d \u0627\u0644\u0645\u0646\u062a\u062c\u0627\u062a\n                <span>\u2190<\/span>\n            <\/a>\n\n        <\/div>\n\n    <\/section>\n\n    <script>\n    (function () {\n\n        if (window.bilssWishlistPageLoaded) return;\n        window.bilssWishlistPageLoaded = true;\n\n        var STORAGE_KEY = 'bilss_wishlist';\n        var grid = document.getElementById('bilss-wishlist-grid');\n        var empty = document.getElementById('bilss-wishlist-empty');\n\n        if (!grid || !empty) return;\n\n        function getWishlist() {\n            try {\n                var saved = localStorage.getItem(STORAGE_KEY);\n                var parsed = saved ? JSON.parse(saved) : [];\n\n                if (!Array.isArray(parsed)) {\n                    return [];\n                }\n\n                return parsed.map(Number).filter(function (id) {\n                    return id > 0;\n                });\n\n            } catch (e) {\n                return [];\n            }\n        }\n\n        function renderWishlist() {\n\n            var ids = getWishlist();\n\n            grid.innerHTML = '';\n\n            if (!ids.length) {\n                grid.hidden = true;\n                empty.hidden = false;\n                return;\n            }\n\n            grid.hidden = false;\n            empty.hidden = true;\n\n            ids.forEach(function (id) {\n\n                var item = document.createElement('div');\n\n                item.className = 'bilss-wishlist-item';\n                item.dataset.productId = id;\n\n                item.innerHTML =\n                    '<div class=\"bilss-wishlist-loading\">' +\n                    '<span><\/span>' +\n                    '<\/div>';\n\n                grid.appendChild(item);\n\n                fetch(\n                    'https:\/\/bilssstore.com\/wp-admin\/admin-ajax.php' +\n                    '?action=bilss_get_wishlist_product&product_id=' +\n                    encodeURIComponent(id)\n                )\n                .then(function (response) {\n                    return response.json();\n                })\n                .then(function (result) {\n\n                    if (!result.success || !result.data) {\n                        item.remove();\n                        checkEmpty();\n                        return;\n                    }\n\n                    item.innerHTML = result.data.html;\n\n                    var remove = item.querySelector(\n                        '.bilss-wishlist-remove'\n                    );\n\n                    if (remove) {\n                        remove.addEventListener(\n                            'click',\n                            function () {\n\n                                var current = getWishlist();\n\n                                current = current.filter(\n                                    function (productId) {\n                                        return productId !== id;\n                                    }\n                                );\n\n                                localStorage.setItem(\n                                    STORAGE_KEY,\n                                    JSON.stringify(current)\n                                );\n\n                                item.remove();\n\n                                checkEmpty();\n                            }\n                        );\n                    }\n\n                })\n                .catch(function () {\n                    item.remove();\n                    checkEmpty();\n                });\n\n            });\n        }\n\n        function checkEmpty() {\n\n            if (!grid.children.length) {\n                grid.hidden = true;\n                empty.hidden = false;\n            }\n\n        }\n\n        renderWishlist();\n\n    })();\n    <\/script>\n\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-310","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/bilssstore.com\/index.php?rest_route=\/wp\/v2\/pages\/310","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bilssstore.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/bilssstore.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/bilssstore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=310"}],"version-history":[{"count":0,"href":"https:\/\/bilssstore.com\/index.php?rest_route=\/wp\/v2\/pages\/310\/revisions"}],"wp:attachment":[{"href":"https:\/\/bilssstore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=310"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}