{"id":794,"date":"2026-07-07T17:20:14","date_gmt":"2026-07-07T13:50:14","guid":{"rendered":"https:\/\/persian-seo.ir\/sepidar\/?page_id=794"},"modified":"2026-07-08T12:49:09","modified_gmt":"2026-07-08T09:19:09","slug":"wishlist","status":"publish","type":"page","link":"https:\/\/persian-seo.ir\/sepidar\/wishlist\/","title":{"rendered":"\u0639\u0644\u0627\u0642\u0647 \u0645\u0646\u062f\u06cc \u0647\u0627"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"794\" class=\"elementor elementor-794\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ba73f78 e-flex e-con-boxed e-con e-parent\" data-id=\"ba73f78\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6842586 elementor-widget elementor-widget-ts-wishlist\" data-id=\"6842586\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"ts-wishlist.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"ts-wishlist-widget\" id=\"tswish-6842586\" data-mode=\"page\">        <div class=\"ts-wish-page\">\n            <div class=\"ts-wish-loader\">\n                <svg class=\"ts-spinner\" width=\"40\" height=\"40\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><circle cx=\"12\" cy=\"12\" r=\"10\" stroke-opacity=\"0.25\"\/><path d=\"M12 2a10 10 0 0 1 10 10\" stroke-linecap=\"round\"\/><\/svg>\n                <span>\u062f\u0631 \u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc...<\/span>\n            <\/div>\n            <div class=\"ts-wish-empty\" style=\"display:none;\">\n                <svg width=\"80\" height=\"80\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1\"><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.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z\"\/><\/svg>\n                <p>\u0644\u06cc\u0633\u062a \u0639\u0644\u0627\u0642\u0647\u200c\u0645\u0646\u062f\u06cc \u0634\u0645\u0627 \u062e\u0627\u0644\u06cc \u0627\u0633\u062a<\/p>\n                <a href=\"\/shop\" class=\"ts-wish-shop-btn\">\u0645\u0634\u0627\u0647\u062f\u0647 \u0645\u062d\u0635\u0648\u0644\u0627\u062a<\/a>\n            <\/div>\n            <div class=\"ts-wish-grid\" style=\"display:none;\"><\/div>\n        <\/div>\n        <\/div>        <style>\n        .ts-wish-btn{background:none;border:none;cursor:pointer;padding:8px;color:#6b7280;transition:all .3s}\n        .ts-wish-btn:hover,.ts-wish-btn.active{color:#ef4444}\n        .ts-wish-btn .heart-filled{display:none}\n        .ts-wish-btn.active .heart-empty{display:none}\n        .ts-wish-btn.active .heart-filled{display:block}\n        \n        .ts-wish-header{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:inherit}\n        .ts-wish-icon-wrap{position:relative;display:inline-flex;color:#6b7280}\n        .ts-wish-badge{position:absolute;top:-8px;right:-8px;min-width:18px;height:18px;background:#ef4444;color:#fff;font-size:11px;font-weight:600;border-radius:50%;display:flex;align-items:center;justify-content:center}\n        .ts-wish-text{font-size:13px}\n        \n        .ts-wish-page{padding:20px 0;min-height:300px}\n        .ts-wish-loader{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:80px 20px;color:#6b7280;gap:16px}\n        .ts-spinner{animation:ts-spin 1s linear infinite}\n        @keyframes ts-spin{to{transform:rotate(360deg)}}\n        \n        .ts-wish-empty{text-align:center;padding:60px 20px;color:#9ca3af}\n        .ts-wish-empty svg{margin-bottom:20px;color:#d1d5db}\n        .ts-wish-empty p{font-size:16px;margin:0 0 20px;color:#6b7280}\n        .ts-wish-shop-btn{display:inline-block;padding:12px 30px;background:#3b82f6;color:#fff;border-radius:8px;text-decoration:none;font-size:14px}\n        .ts-wish-shop-btn:hover{background:#2563eb}\n        \n        .ts-wish-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}\n        @media(max-width:1200px){.ts-wish-grid{grid-template-columns:repeat(3,1fr)}}\n        @media(max-width:900px){.ts-wish-grid{grid-template-columns:repeat(2,1fr)}}\n        @media(max-width:600px){.ts-wish-grid{grid-template-columns:1fr}}\n        \n        .ts-wish-item{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;position:relative}\n        .ts-wish-item-img{aspect-ratio:1;overflow:hidden}\n        .ts-wish-item-img img{width:100%;height:100%;object-fit:cover}\n        .ts-wish-item-info{padding:16px}\n        .ts-wish-item-title{font-size:14px;font-weight:500;margin:0 0 8px;display:block}\n        .ts-wish-item-title a{color:#1f2937;text-decoration:none}\n        .ts-wish-item-price{font-size:15px;font-weight:600;color:#059669}\n        .ts-wish-item-remove{position:absolute;top:10px;right:10px;width:32px;height:32px;background:#fff;border:none;border-radius:50%;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,0.1);color:#9ca3af;display:flex;align-items:center;justify-content:center}\n        .ts-wish-item-remove:hover{background:#fee2e2;color:#ef4444}\n        .ts-wish-item-cart{width:100%;padding:10px;background:#3b82f6;color:#fff;border:none;border-radius:6px;cursor:pointer;font-size:13px;margin-top:12px}\n        .ts-wish-item-cart:hover{background:#2563eb}\n        <\/style>\n                <script>\n        document.addEventListener('DOMContentLoaded', function(){\n            const KEY='ts_wishlist';\n            const ajaxUrl='https:\/\/persian-seo.ir\/sepidar\/wp-admin\/admin-ajax.php';\n            \n            function getList(){\n                try{return JSON.parse(localStorage.getItem(KEY))||[];}\n                catch(e){return [];}\n            }\n            \n            function saveList(l){\n                localStorage.setItem(KEY,JSON.stringify(l));\n            }\n            \n            function toggle(id){\n                let l=getList();\n                const i=l.indexOf(id);\n                if(i>-1){l.splice(i,1);}\n                else{l.push(id);}\n                saveList(l);\n                updateUI();\n            }\n            \n            function updateUI(){\n                const l=getList();\n                \/\/ \u0622\u067e\u062f\u06cc\u062a \u062a\u0639\u062f\u0627\u062f\n                document.querySelectorAll('.ts-wish-badge').forEach(function(el){\n                    el.textContent=l.length;\n                });\n                \/\/ \u0622\u067e\u062f\u06cc\u062a \u062f\u06a9\u0645\u0647\u200c\u0647\u0627\n                document.querySelectorAll('.ts-wish-btn').forEach(function(btn){\n                    const id=parseInt(btn.dataset.id);\n                    if(l.includes(id)){\n                        btn.classList.add('active');\n                    }else{\n                        btn.classList.remove('active');\n                    }\n                });\n            }\n            \n            function loadPage(){\n                const page=document.querySelector('.ts-wish-page');\n                if(!page)return;\n                \n                const l=getList();\n                const grid=page.querySelector('.ts-wish-grid');\n                const empty=page.querySelector('.ts-wish-empty');\n                const loader=page.querySelector('.ts-wish-loader');\n                \n                if(l.length===0){\n                    if(loader)loader.style.display='none';\n                    if(empty)empty.style.display='block';\n                    if(grid){grid.style.display='none';grid.innerHTML='';}\n                    return;\n                }\n                \n                if(loader)loader.style.display='flex';\n                if(empty)empty.style.display='none';\n                if(grid)grid.style.display='none';\n                \n                const fd=new FormData();\n                fd.append('action','ts_get_wishlist');\n                fd.append('nonce','6b7aae4ff6');\n                fd.append('ids',l.join(','));\n                \n                fetch(ajaxUrl,{method:'POST',body:fd})\n                .then(function(r){return r.json();})\n                .then(function(d){\n                    if(loader)loader.style.display='none';\n                    if(d.success && d.data && d.data.html){\n                        if(grid){\n                            grid.innerHTML=d.data.html;\n                            grid.style.display='grid';\n                        }\n                    }else{\n                        if(empty)empty.style.display='block';\n                    }\n                })\n                .catch(function(){\n                    if(loader)loader.style.display='none';\n                    if(empty)empty.style.display='block';\n                });\n            }\n            \n            \/\/ \u06a9\u0644\u06cc\u06a9\n            document.addEventListener('click',function(e){\n                var btn=e.target.closest('.ts-wish-btn');\n                if(btn){\n                    e.preventDefault();\n                    toggle(parseInt(btn.dataset.id));\n                    return;\n                }\n                \n                var rm=e.target.closest('.ts-wish-item-remove');\n                if(rm){\n                    e.preventDefault();\n                    toggle(parseInt(rm.dataset.id));\n                    loadPage();\n                    return;\n                }\n            });\n            \n            \/\/ \u0627\u062c\u0631\u0627\u06cc \u0627\u0648\u0644\u06cc\u0647\n            updateUI();\n            loadPage();\n        });\n        <\/script>\n        \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>\n\t\t","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u062d\u0627\u0644 \u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc&#8230; \u0644\u06cc\u0633\u062a \u0639\u0644\u0627\u0642\u0647\u200c\u0645\u0646\u062f\u06cc \u0634\u0645\u0627 \u062e\u0627\u0644\u06cc \u0627\u0633\u062a \u0645\u0634\u0627\u0647\u062f\u0647 \u0645\u062d\u0635\u0648\u0644\u0627\u062a<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-794","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/pages\/794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/comments?post=794"}],"version-history":[{"count":11,"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/pages\/794\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/pages\/794\/revisions\/919"}],"wp:attachment":[{"href":"https:\/\/persian-seo.ir\/sepidar\/wp-json\/wp\/v2\/media?parent=794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}