• Resolved majdawoocomm

    (@majdawoocomm)


    Hi,

    We just updated your plugin to the newest version (1.9.9.) and we noticed that counter in menu is displaying 1 item in wishlist, even thought when you open Wishlist page, it is empty. The same thing happens when we add one product to cart, counter is displaying number two etc. So, the counter is always displaying one product more.

    Our website is on WP Engine and we are not using any caching plugin at all. We also tried to purge all WP Engine’s caches, but the problem remained…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter majdawoocomm

    (@majdawoocomm)

    Just to add that for non-logged in user (guest) everything works fine, for logged in user this code:

    $counts   = $wlp->get( array(
    				'external'    => false,
    				'wishlist_id' => $wishlist['ID'],
    				'sql'         => 'SELECT COUNT(<code>quantity</code>) AS <code>quantity</code> FROM {table} t1 INNER JOIN ' . $wpdb->prefix . 'posts t2 on t1.product_id = t2.ID AND t2.post_status = "publish" WHERE {where} ',
    			) );

    always returns quantity bigger for 1.

    Plugin Support Stan

    (@stantinv)

    Hi @majdawoocomm,

    Can you create an access for us to your staging site on WP Engine, so we will be able to debug the issue?

    You can send the details via our support chat.

    Regards,
    Stan

    Thread Starter majdawoocomm

    (@majdawoocomm)

    Hi again,

    I did some more investigation. Sending you screen shot from our database.

    When I checked upper code from your plugin, I could see that it is getting Wishlist with ID = 1 in my case. When I went to database, there were two products in wishlist with that ID and counter was showing 2, what is correct. My user ID is 45, what is also correct. But the problem is that Wishlist page was displaying product from another wishlist ID. Please see screen shot from database. In red are marked products from my wishlist (2 products) and counter is displaying 2. But the product that was displaying on Wishlist page is the one marked with blue. Maybe that can help you? Maybe the counter is correct, but product items in wishlist are not…

    Here is the screen shot:

    https://drive.google.com/file/d/13BmTaVzGvTAa0WbI5pGkDiwONAFsFR7d/view?usp=sharing

    Thread Starter majdawoocomm

    (@majdawoocomm)

    Closing this, considering that we did not have such problems on our live site, just on our staging site. On live site everything is displayed OK. Thank you for all your help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Counter number not correct’ is closed to new replies.