Title: levke21's Replies | WordPress.org

---

# levke21

  [  ](https://wordpress.org/support/users/levke21/)

 *   [Profile](https://wordpress.org/support/users/levke21/)
 *   [Topics Started](https://wordpress.org/support/users/levke21/topics/)
 *   [Replies Created](https://wordpress.org/support/users/levke21/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/levke21/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/levke21/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/levke21/engagements/)
 *   [Favorites](https://wordpress.org/support/users/levke21/favorites/)

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/levke21/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/levke21/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Conditional Fields for Contact Form 7] Problem with reCAPTCHA](https://wordpress.org/support/topic/problem-with-recaptcha-14/)
 *  [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/problem-with-recaptcha-14/#post-17808888)
 * Hello,
   I think I have this problem too. Does any version already fix this?
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC Smart Compare for WooCommerce] Compare button action](https://wordpress.org/support/topic/compare-button-action/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/compare-button-action/#post-17303064)
 * The code section above does not work well from v6.1.7 for some reason. Worked
   fine v6.1.6
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TI WooCommerce Wishlist] Wishlist of current products](https://wordpress.org/support/topic/wishlist-of-current-products/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/wishlist-of-current-products/#post-17229340)
 * Unfortunately I don’t think reading the session is a good idea.
 * Perhaps you need to modify the code so that it requests the currently displayed
   products from the API instead. I tried to do this but it didn’t work. The code
   still seems to count in the original way. (public.js / pulblic.mini.js)
 *     ```wp-block-code
       // Get wishlist data from REST API.
       var tinvwl_products = [],
         tinvwl_counter = false;
       $('.wishlist_products_counter_number').each(function () {
         tinvwl_counter = true;
       });
       var get_data_ajax = function get_data_ajax(refresh) {
         var current_products = [];
         $('a.tinvwl_add_to_wishlist_button').each(function () {
           if ('undefined' !== $(this).data('tinv-wl-product') && $(this).data('tinv-wl-product')) {
             current_products.push($(this).data('tinv-wl-product'));
           }
         });
         if ((current_products.length > 0 || tinvwl_counter) && tinvwl_add_to_wishlist.user_interacted) {
           tinvwl_products = current_products;
           var data = {
             'tinvwl-action': 'get_data',
             'tinvwl-security': tinvwl_add_to_wishlist.nonce
           };
           if ('refresh' === refresh) {
             var form = $('div.tinv-wishlist.woocommerce.tinv-wishlist-clear form[data-tinvwl_sharekey]');
             if (form.length) {
               $('div.tinv-wishlist.woocommerce.tinv-wishlist-clear').block({
                 message: null,
                 overlayCSS: {
                   background: '#fff',
                   opacity: 0.6
                 }
               });
               data['tinvwl-paged'] = form.data('tinvwl_paged');
               data['tinvwl-per-page'] = form.data('tinvwl_per_page');
               data['tinvwl-sharekey'] = form.data('tinvwl_sharekey');
             }
           }
           if (tinvwl_add_to_wishlist.wpml) {
             data.lang = tinvwl_add_to_wishlist.wpml;
           }
           if (tinvwl_add_to_wishlist.wpml_default) {
             data.lang_default = tinvwl_add_to_wishlist.wpml_default;
           }
           if (tinvwl_add_to_wishlist.stats) {
             data.stats = tinvwl_add_to_wishlist.stats;
           }
           $.ajax({
             url: tinvwl_add_to_wishlist.wc_ajax_url,
             method: 'POST',
             cache: false,
             data: data,
             beforeSend: function beforeSend(xhr) {
               xhr.setRequestHeader('X-WP-Nonce', tinvwl_add_to_wishlist.nonce);
             }
           }).done(function (response) {
             if ('refresh' === refresh) {
               $('div.tinv-wishlist.woocommerce.tinv-wishlist-clear').unblock();
               $(document.body).trigger('wc_fragment_refresh');
               $('div.tinv-wishlist.woocommerce.tinv-wishlist-clear').replaceWith(response.content);
               localStorage.setItem(hash_key + '_refresh', '');
             }
             if (response.wishlists_data) {
               set_hash(JSON.stringify(response.wishlists_data));
             }
             $('body').trigger('tinvwl_wishlist_ajax_response', [this, response]);
           });
         }
       };
       $.fn.tinvwl_get_wishlist_data = function (refresh) {
         if ('refresh' === refresh) {
           get_data_ajax(refresh);
           return;
         }
         if ($supports_html5_storage) {
           if ('undefined' !== typeof Cookies && Cookies.get('tinvwl_update_data') !== undefined) {
             Cookies.set('tinvwl_update_data', 0, {
               expires: -1
             });
             localStorage.setItem(hash_key, '');
           }
           if (localStorage.getItem(hash_key)) {
             var data = JSON.parse(localStorage.getItem(hash_key));
             if ('object' === _typeof(data) && null !== data && (data.hasOwnProperty('products') || data.hasOwnProperty('counter'))) {
               if (!data.hasOwnProperty('lang') && !tinvwl_add_to_wishlist.wpml || tinvwl_add_to_wishlist.wpml && data.lang === tinvwl_add_to_wishlist.wpml) {
                 if ('undefined' !== typeof Cookies && Cookies.get('tinvwl_wishlists_data_counter') === undefined) {
                   mark_products(data);
                   return;
                 }
                 if ('undefined' !== typeof Cookies && Cookies.get('tinvwl_wishlists_data_counter') == data.counter && (!data.hasOwnProperty('stats_count') || Cookies.get('tinvwl_wishlists_data_stats') == data.stats_count)) {
                   mark_products(data);
                   return;
                 }
               }
             }
           }
         }
         if (tinvwl_add_to_wishlist.block_ajax_wishlists_data) {
           setTimeout(function () {
             mark_products(data);
           }, 500);
           return;
         }
         get_data_ajax();
       };
       tinvwl_add_to_wishlist.user_interacted = false;
       $.fn.tinvwl_get_wishlist_data();
       $(document).one('click keydown scroll', function () {
         tinvwl_add_to_wishlist.user_interacted = true;
         $.fn.tinvwl_get_wishlist_data();
       });
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TI WooCommerce Wishlist] Wishlist of current products](https://wordpress.org/support/topic/wishlist-of-current-products/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/wishlist-of-current-products/#post-17228719)
 * Hi,
   Thank you for the response, since then I have tried approaching the thing
   in several different ways. I concluded that without modifying the IT Wishlist
   plugin, perhaps reading the product identifiers from the “session file” would
   be a good solution for achieving my goal. I wrote a code for this (shown below)
   but it is probably incorrect, because it does not return the appropriate value.
 * It would be best if I could somehow modify the original IT Wishlist code to work
   for me appropriately. I will gladly get a subscription if necessary to get sure
   help with this matter.
 * I asked several developers in my environment, but no one could help me meaningfully
   with this. I hope you can. This feature is unique in itself, as I didn’t find
   any extension that could do this.
 * The essence of the feature would be for the wishlist to be able to work as a “
   Collection or Collection” for those users who do not want to buy the product 
   but have already purchased the product (possibly not from my webshop but from
   elsewhere). And they see this throughout the entire website with a concrete counter
   that can also be filtered by attributes.
 *     ```wp-block-code
       // Session file prefix
       $session_file_prefix = 'ti_wishlist_data_';
       // Session file suffix - this contains the blog id and URL
       $session_file_suffix = md5(get_current_blog_id() . '_' . get_site_url(get_current_blog_id(), '/') . get_template());
       // Full session file path
       $wishlist_data_file = WP_CONTENT_DIR . '/sessions/' .
       $session_file_prefix . $session_file_suffix . '.dat';
       // Check if the file exists
       if(file_exists($wishlist_data_file)) {
       // Decode the contents
       $session_data = unserialize(file_get_contents($session_file));
       // Check if the session data is empty
       if(empty($session_data)) {
       error_log('Empty session data');
       }
       error_log(print_r($session_data, true));
       // Check the products part
       if(!isset($session_data['products'])) {
       error_log('No products');
       }
       // Create an empty array
   
       $product_id = [];
       // Take out the products part
       $products = $session_data['products'];
       foreach($products as $key => $product){
       error_log("Product: $key");
       $product_id[] = array_keys($product)[0];
       }
       } else {
       error_log("Failed to load session file");
       // File does not exist or is not readable
       // handle the error
       }
       function my_collection_shortcode() {
       global $product_id;
       if(empty($product_id)) {
       $count = 'ures a globalis valtozo';
       } else {
       $count = count($product_id);
       }
       return 'Number of products: ' . $count;
       }
       add_shortcode('my_collection_shortcode', 'my_collection_shortcode');
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WPC Smart Compare for WooCommerce] Compare button action](https://wordpress.org/support/topic/compare-button-action/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/compare-button-action/#post-17183341)
 * In the meantime I solved the task.
   1. Edit the “frontend.js” file of the plugin.
   2. The following lines need to be replaced:
 *     ```wp-block-code
        woosc_remove_product(id);
               if (woosc_vars.button_action === 'show_message') {
                 $.notiny({
                   theme: 'woosc',
                   position: woosc_vars.message_position,
                   image: product_image,
                   text: woosc_vars.message_removed.replace('{name}',
                       '<strong>' + product_name + '</strong>'),
                 });
               }
          }
       ```
   
 * TO:
 *     ```wp-block-code
         if ((woosc_vars.page_url !== '') && (woosc_vars.page_url !== '#')) {
                 window.location.href = woosc_vars.page_url;
               }
             } 
       ```
   
    3. Save frontend.js file
    4. In the plugin settings, modify this setting: “Remove when clicking again = YES”
    5. Save settings
    6. Clear cache (all device)
    7. Test
 *  -  This reply was modified 2 years, 6 months ago by [levke21](https://wordpress.org/support/users/levke21/).
    -  This reply was modified 2 years, 6 months ago by [levke21](https://wordpress.org/support/users/levke21/).
    -  This reply was modified 2 years, 6 months ago by [levke21](https://wordpress.org/support/users/levke21/).
    -  This reply was modified 2 years, 6 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[AgreeMe Checkboxes For WooCommerce] Required checkbox not work](https://wordpress.org/support/topic/required-not-work/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/required-not-work/#post-16535209)
 * Yes, it works. Just had to clear the cache. Thanks.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Privacy policy for product reviews on the product page](https://wordpress.org/support/topic/privacy-policy-product-reviews/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/privacy-policy-product-reviews/#post-15304383)
 * Thanks for the reply. I’m sorry. Don’t we misunderstand each other? I knew about
   the function. My question was different. I would like to accept the privacy policy
   with product evaluators.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Privacy policy for product reviews on the product page](https://wordpress.org/support/topic/privacy-policy-product-reviews/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/privacy-policy-product-reviews/#post-15304375)
 * Thanks for the reply.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Compare] On mobile device “jumping” compare table](https://wordpress.org/support/topic/on-mobile-device-jumping-compare-table/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/on-mobile-device-jumping-compare-table/#post-14591874)
 * Hi,
 * Unfortunately the issue has reappeared / Or persists.
 * I’m sending two videos of it:
    [https://drive.google.com/file/d/11isrcJM470TtPqCY98K6A1yYHHZtMqsl/view?usp=sharing](https://drive.google.com/file/d/11isrcJM470TtPqCY98K6A1yYHHZtMqsl/view?usp=sharing)
 * [https://drive.google.com/file/d/1Af9YhWy5FgmQGHR4ezksqz6CMHpiznTS/view?usp=drivesdk](https://drive.google.com/file/d/1Af9YhWy5FgmQGHR4ezksqz6CMHpiznTS/view?usp=drivesdk)
 * Regards,
    Levente
    -  This reply was modified 4 years, 10 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[YITH WooCommerce Compare] On mobile device “jumping” compare table](https://wordpress.org/support/topic/on-mobile-device-jumping-compare-table/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/on-mobile-device-jumping-compare-table/#post-14527830)
 * Hi,
 * I am using a Samsung S21 phone with the latest Chrome browser. But I tried iPhone
   8 and iPhone XR phone and Samsung S10e devices but the problem is same.
 * Ok. I will write for commercial version platform. Thank you.
 * Regards
    -  This reply was modified 4 years, 11 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Masks Form Fields] Alphanumeric + number caracter mask](https://wordpress.org/support/topic/alphanumeric-number-caracter-mask/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/alphanumeric-number-caracter-mask/#post-13626461)
 * In function code which character corrects the position of the any characters?
   Thank you.
    -  This reply was modified 5 years, 6 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[HuCommerce | Magyar kiegészítések WooCommerce webáruházakhoz] Adószám mező kötelezően kitöltendő](https://wordpress.org/support/topic/adoszam-mezo-kotelezoen-kitoltendo-lenne/)
 *  Thread Starter [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/adoszam-mezo-kotelezoen-kitoltendo-lenne/#post-13359976)
 * Szia,
 * Köszönöm, ez logikus.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TI WooCommerce Wishlist] Adding/removing variations from wishlist doesn’t work properly](https://wordpress.org/support/topic/removing-variations-from-wishlist-doesnt-work-properly/)
 *  [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/removing-variations-from-wishlist-doesnt-work-properly/#post-13264360)
 * I update plugin the latest version but the issue is same like this. What should
   I do?
    My test website with issue: [https://ovek.lookz.hu/product/noi-mubor-ov/](https://ovek.lookz.hu/product/noi-mubor-ov/)
 * Thank you.
 * Regards,
    Levente
    -  This reply was modified 5 years, 9 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TI WooCommerce Wishlist] Add to wishlist button not showing to logged out users after updating woocommerc](https://wordpress.org/support/topic/add-to-wishlist-button-not-showing-to-logged-out-users-after-updating-woocommerc/)
 *  [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/add-to-wishlist-button-not-showing-to-logged-out-users-after-updating-woocommerc/#post-13193921)
 * Hello,
 * Yes I have.
 * I think there is a compatibility issue with plugin called Variation Swatches 
   for WooCommerce.
 * Plugin link: [https://wordpress.org/plugins/variation-swatches-for-woocommerce/](https://wordpress.org/plugins/variation-swatches-for-woocommerce/)
 * Link to my webpage:
    [http://poshhungary.com/](http://poshhungary.com/)
 * Regards,
    Levi
    -  This reply was modified 5 years, 9 months ago by [levke21](https://wordpress.org/support/users/levke21/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[TI WooCommerce Wishlist] Add to wishlist button not showing to logged out users after updating woocommerc](https://wordpress.org/support/topic/add-to-wishlist-button-not-showing-to-logged-out-users-after-updating-woocommerc/)
 *  [levke21](https://wordpress.org/support/users/levke21/)
 * (@levke21)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/add-to-wishlist-button-not-showing-to-logged-out-users-after-updating-woocommerc/#post-13192582)
 * Hello,
    Thank you for update. The problem is solved. But maybe another issue 
   has developed. After pressing the add to cart button on the wislist page, the
   wishlist button does not work well on the product page. I try to add to wishlist
   product on the product page but the icon not changed just when I refresh the 
   page.
 * Regards,
    Levente

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/users/levke21/replies/page/2/?output_format=md)
[→](https://wordpress.org/support/users/levke21/replies/page/2/?output_format=md)