Home Forums WoodMart support forum Wishlist count wrong

Wishlist count wrong

Viewing 18 posts - 1 through 18 (of 18 total)
  • Author
    Posts
  • #167083

    Inzman
    Participant

    Hello.
    Has this been solved? https://xtemos.com/forums/topic/wishlist-empty-shows-1-to-the-header-icon-2/
    “The problem is that you have added some products to the wishlist and then removed it. We will add a function in our next theme update to actualize wishlists when you visit the page and remove items that don’t exist in the store anymore.”
    Pretty sure I have the same issue.

    Thanks

    #167098

    Artem Temos
    Keymaster

    Hello,

    Could you please disable all plugins that are not related to our theme and provide us your admin and FTP access so we can check it?

    Thank you in advance

    #167114

    Inzman
    Participant

    I cannot do that on Live site and my staging is currently unavailable.
    Made a quick test:
    created a product
    added it to wishlist in front end
    changed it to Draft in back end
    wishlist is empty now but the count is still 1
    Same thing when I delete the product.
    (cache cleared)

    #167119

    Artem Temos
    Keymaster

    Wishlist runs a function to remove already delete products from all wishlists once per day to optimize the performance. But be sure that you are running the latest version of our theme already.

    #167337

    Inzman
    Participant

    Yes, last theme version.
    Alright, maybe they will go away during 24h indeed, didn’t think of such a thing.
    I suppose we can live with it.
    Will write a function to check wishlists values on post_save/trash or smth.

    #167339

    Artem Temos
    Keymaster

    Fine, contact us if you will have any other questions.

    #168877

    Inzman
    Participant

    Hello.
    So, from the database, I see that the issue is also about “Drafts”. I wonder if there’s a reason to also include status-draft IDs in wishlists? I understand that these can be Published again, but they also may not be. Therefore as a result the count is wrong.

    #168890

    Artem Temos
    Keymaster

    Hi,

    OK, we will check this on our next theme update.

    Regards

    #172972

    Inzman
    Participant

    Also noticed that “Out of stock” products are not shown in Wishlist. (woocommerce_hide_out_of_stock_items == true).

    #172988

    Artem Temos
    Keymaster

    Do you still see these products on your shop page? Please, send us an example so we can check.

    #173009

    Inzman
    Participant

    As I wrote, when “woocommerce_hide_out_of_stock_items” setting in Woocommerce is TRUE/YES then it also applies for the Wishlist view. When this setting is “FALSE/NO”, item is shown in Wishlist view. Toggling this option on/off makes the difference in spoken behaviour.
    No, currently I wouldn’t like to share a link.

    #173014

    Artem Temos
    Keymaster

    Yes, it is how it supposed to work. If the product is not shown on the shop page, it is not possible to display it in Wishlist as well.

    #173102

    Inzman
    Participant

    Yes, understood. It’s just that the topic name here is “Wishlist count wrong”.
    In case of out-of-stock products are not shown in the catalogue, it doesn’t mean these cannot be “wishlisted”. So it still can be added to wishlist, the counter increases by one, but it won’t actually be shown in wishlist.
    Result? Wishlist count wrong again.
    PS! On the other hand it doesn’t make sense NOT to show these products in Wishlist, since they are completely accessible and the setting actually should only affect Woocommerce catalogue, not the wishlist.

    #173112

    Artem Temos
    Keymaster

    If you don’t see it in the shop page then how you can add it to the wishlist? The wishlist number will be recalculated once per day to remove already deleted products from the store.

    #173147

    Inzman
    Participant

    When this setting is ON, it just doesn’t show out-of-stock products in the catalogue. It doesn’t mean the product is unreachable, the URL still exists.
    Most of our traffic comes from search engines where are listed links for product single views. And in single view, there is “Add to wishlist” button.

    #173224

    Artem Temos
    Keymaster

    Try to edit the file woodmart/inc/integrations/woocommerce/modules/wishlist/class-wishlist.php and replace this line

    if ( ! get_post_status( $product_id ) || ( 'yes' === get_option( 'woocommerce_hide_out_of_stock_items' ) && 'outofstock' === $stock_status ) ) {

    with this one

    if ( ! get_post_status( $product_id ) ) {

    Then you need to install “Transients manager” plugin and clear transient called wishlist_unnecessary_products.

    Kind Regards

    #173247

    Inzman
    Participant

    Thanks, I’m running a child theme.
    I didn’t need a solution, I just let you know of this issue, that’s it.
    All the best.

    #173248

    Artem Temos
    Keymaster

    OK, thank you for noticing 🙂

Viewing 18 posts - 1 through 18 (of 18 total)