Home › Forums › WoodMart support forum › Wishlist count wrong
Wishlist count wrong
- This topic has 17 replies, 2 voices, and was last updated 4 years, 10 months ago by Artem Temos.
-
AuthorPosts
-
January 9, 2020 at 7:47 am #167083
InzmanParticipantHello.
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
January 9, 2020 at 8:36 am #167098
Artem TemosKeymasterHello,
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
January 9, 2020 at 9:47 am #167114
InzmanParticipantI 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)January 9, 2020 at 9:58 am #167119
Artem TemosKeymasterWishlist 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.
January 10, 2020 at 3:19 pm #167337
InzmanParticipantYes, 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.January 10, 2020 at 3:27 pm #167339
Artem TemosKeymasterFine, contact us if you will have any other questions.
January 20, 2020 at 9:29 am #168877
InzmanParticipantHello.
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.January 20, 2020 at 10:13 am #168890
Artem TemosKeymasterHi,
OK, we will check this on our next theme update.
Regards
February 12, 2020 at 11:35 am #172972
InzmanParticipantAlso noticed that “Out of stock” products are not shown in Wishlist. (woocommerce_hide_out_of_stock_items == true).
February 12, 2020 at 12:35 pm #172988
Artem TemosKeymasterDo you still see these products on your shop page? Please, send us an example so we can check.
February 12, 2020 at 1:36 pm #173009
InzmanParticipantAs 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.February 12, 2020 at 7:55 pm #173014
Artem TemosKeymasterYes, 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.
February 13, 2020 at 7:46 am #173102
InzmanParticipantYes, 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.February 13, 2020 at 10:16 am #173112
Artem TemosKeymasterIf 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.
February 13, 2020 at 10:44 am #173147
InzmanParticipantWhen 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.February 13, 2020 at 2:20 pm #173224
Artem TemosKeymasterTry to edit the file
woodmart/inc/integrations/woocommerce/modules/wishlist/class-wishlist.php
and replace this lineif ( ! 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
February 13, 2020 at 2:57 pm #173247
InzmanParticipantThanks, 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.February 13, 2020 at 3:09 pm #173248
Artem TemosKeymasterOK, thank you for noticing 🙂
-
AuthorPosts
- You must be logged in to create new topics. Login / Register