{"id":687,"date":"2023-05-10T02:19:45","date_gmt":"2023-05-10T02:19:45","guid":{"rendered":"https:\/\/zmnd.wordpresslab.ru\/florist\/wishlist\/"},"modified":"2025-04-18T21:48:35","modified_gmt":"2025-04-18T21:48:35","slug":"wishlist","status":"publish","type":"page","link":"https:\/\/zmnd.wordpresslab.ru\/florist\/wishlist\/","title":{"rendered":"\u0421\u043f\u0438\u0441\u043e\u043a \u0436\u0435\u043b\u0430\u043d\u0438\u0439"},"content":{"rendered":"                \n                <div class=\"guest-wishlist-items\">\n                    <script>\n                        jQuery(document).ready(function($) {\n                            var translations = {\"empty_wishlist\":\"\\u0412\\u0430\\u0448 \\u0441\\u043f\\u0438\\u0441\\u043e\\u043a \\u0436\\u0435\\u043b\\u0430\\u043d\\u0438\\u0439 \\u043f\\u0443\\u0441\\u0442\",\"remove_from_wishlist\":\"\\u0423\\u0434\\u0430\\u043b\\u0438\\u0442\\u044c \\u0438\\u0437 \\u0441\\u043f\\u0438\\u0441\\u043a\\u0430 \\u0436\\u0435\\u043b\\u0430\\u043d\\u0438\\u0439\"};\n                            var guestWishlist = localStorage.getItem('guestWishlist');\n                            if (guestWishlist) {\n                                try {\n                                    var wishlistItems = JSON.parse(guestWishlist);\n                                    if (wishlistItems && wishlistItems.length > 0) {\n                                        $.ajax({\n                                            url: wishlistData.ajaxurl,\n                                            type: 'POST',\n                                            data: {\n                                                action: 'get_posts_data',\n                                                post_id: wishlistItems,\n                                                nonce: wishlistData.nonce\n                                            },\n                                            success: function(response) {\n                                                if (response.success) {\n                                                    var html = '';\n                                                    $.each(response.data, function(postId, postData) {\n                                                        html += '<div class=\"wishlist-item\" data-post-id=\"' + postId + '\">';\n                                                        html += '<div class=\"wishlist-item-thumbnail\">';\n                                                        if (postData.thumbnail) {\n                                                            html += '<a href=\"' + postData.permalink + '\">' + postData.thumbnail + '<\/a>';\n                                                        }\n                                                        html += '<\/div>';\n                                                        html += '<div class=\"wishlist-item-info\">';\n                                                        html += '<h3><a href=\"' + postData.permalink + '\">' + postData.title + '<\/a><\/h3>';\n                                                        html += '<button class=\"remove-from-wishlist\" data-post-id=\"' + postId + '\">' + translations.remove_from_wishlist + '<\/button>';\n                                                        html += '<\/div>';\n                                                        html += '<\/div>';\n                                                    });\n                                                    $('.guest-wishlist-items').html(html);\n                                                }\n                                            }\n                                        });\n                                    } else {\n                                        $('.guest-wishlist-items').html('<p class=\"wishlist-empty\">' + translations.empty_wishlist + '<\/p>');\n                                    }\n                                } catch(e) {\n                                    console.error('Error parsing guest wishlist:', e);\n                                    $('.guest-wishlist-items').html('<p class=\"wishlist-empty\">' + translations.empty_wishlist + '<\/p>');\n                                }\n                            } else {\n                                $('.guest-wishlist-items').html('<p class=\"wishlist-empty\">' + translations.empty_wishlist + '<\/p>');\n                            }\n                        });\n                    <\/script>\n                <\/div>\n                ","protected":false},"excerpt":{"rendered":"","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-687","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/pages\/687","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/comments?post=687"}],"version-history":[{"count":5,"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/pages\/687\/revisions"}],"predecessor-version":[{"id":3504,"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/pages\/687\/revisions\/3504"}],"wp:attachment":[{"href":"https:\/\/zmnd.wordpresslab.ru\/florist\/wp-json\/wp\/v2\/media?parent=687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}