Home › Forums › WoodMart support forum › Product variation name is not showing in wishlist
Product variation name is not showing in wishlist
- This topic has 29 replies, 2 voices, and was last updated 6 months ago by Luke Nielsen.
-
AuthorPosts
-
March 7, 2024 at 2:51 pm #547021
refaParticipantHi,
I am showing variation products as a single product. When I added the product to the wishlist it was not showing with the variation name like on the shop/category page instead, it showed as a variable name. If the product has two or more variations then it’s showing fine.
Also, I want to show the count number on the wishlist icon like the cart icon, how to do that?
Can you please check and resolve this issue? I attached screenshots for your reference.
Thank you,
March 8, 2024 at 10:14 am #547251
Luke NielsenKeymasterHello,
In this case, is there any chance that you could give me access to the dashboard area so I can have a look at the settings on your website, please?
Kind Regards
March 17, 2024 at 2:21 pm #549738
refaParticipantSorry for the delayed response.
I’ve shared the testing website credentials below. If you want to deactivate any plugin/theme for testing, please do.
I noticed one more issue, which is when I add any products to the wishlist for the first time it’s not showing on the wishlist page I have to add it again to appear.
Please find the attached a video for your reference.
Thank you,
March 19, 2024 at 10:28 am #550176
Luke NielsenKeymasterHello,
The thing is that the “Hide parent product” is not working on the Wishlist page, so as a result you can see some products without attribute names because the parent product can be shown there: https://prnt.sc/q56NKQU-s1Qu
For now, it works in such a way.
Kind Regards
March 19, 2024 at 12:07 pm #550236
refaParticipantHow to resolve this? It is coming if the product has only variation, if it has multiple variations then it appears with attributes.
March 20, 2024 at 5:48 pm #550777
Luke NielsenKeymasterHello,
In general, it’s not a bug that the parent product can be shown on the Wishlist page.
In WooCommerce, a variation product has separate simple products that do not have a single product page and are called variations. Our show single variation option when active displays these variations as separate products, but when you go to the single product page of these products, it redirects you to the main product page with this variation selected. When you add products to the wishlist, for example, on the shop page, you add a variation, not the main product, but when you add a product to the wishlist on a single product page, you add the main variation product, and unfortunately, it is impossible to correct this. All we can recommend to you is to hide the Wishlist button on a single product and to add products to the Wishlist only on the archive page.
Kind Regards
March 22, 2024 at 9:33 am #551309
refaParticipantI understood the variation product doesn’t have a separate page but at least the variation we choose should come, right? If it is not coming then showing wishlist items is useless. At least it would help if you allowed customers to see the product variation in the wishlist similar to the “YITH woocommerce wishlist” plugin. I attached the screenshot for your reference.
I also had a problem showing variation products on the related product slider then you helped me with a custom code that worked. I need a similar way to achieve this.
You are allowing customers to see the variation product as a single product on the product page, product sliders, cart page, and checkout page, so why not on the wishlist page?
Also in my screen record video, there is a problem with showing the wishlist items on the wishlist page, in the icon it is showing the numbers but when I go to the page sometimes it is showing, and sometimes it is not.
Also, when the customer logs out the wishlist items are still there, it shouldn’t be there.
Attachments:
You must be logged in to view attached files.March 22, 2024 at 3:40 pm #551488
Luke NielsenKeymasterHello,
1. Sorry for now it works in such a way but the team consider changing it in future updates.
2. Please send some screenshots of the issue in the related product slider.
Thank you for your time and patience.
Kind Regards
March 26, 2024 at 8:39 am #552198
refaParticipantIf the add to wishlist from the product slider is correctly working, and from the single product page is not working can I use the same link that is used on the product slider to the single product page using any template override or custom functions?
Also as I mentioned earlier, for the first time when I add the product to the wishlist it is not showing, I have to do it again to make it appear, and if I logged in and add some products to the wishlist then I logout still those products are showing in wishlist. How to fix these two issues?
March 26, 2024 at 3:49 pm #552417
Luke NielsenKeymasterHello,
1. For now, there is no possible custom code because, in the button setting the ID of the product is defined that will be added to the wishlist.
2. The below code, will clear the wishlist after log out from an account.
add_action('wp_logout', function() { if ( ! function_exists( 'woodmart_set_cookie' ) ) { return; } $cookie_products_name = 'woodmart_wishlist_products'; $cookie_count_name = 'woodmart_wishlist_count'; if ( is_multisite() ) { $cookie_products_name .= '_' . get_current_blog_id(); $cookie_count_name .= '_' . get_current_blog_id(); } woodmart_set_cookie( $cookie_products_name, '' ); woodmart_set_cookie( $cookie_count_name, '' ); });
Also, clear the browser cache/cookie and recheck the issue with the first time added product.
Kind Regards
March 27, 2024 at 8:24 am #552569
refaParticipantThank you, the code works for me.
The first time added a product to the wishlist issue was still there. I cleared the cache and cookies from my browser. I checked with different browsers and systems, but the issue remains.
Please help me to resolve this issue.
Thank you,
March 27, 2024 at 4:21 pm #552787
Luke NielsenKeymasterHello,
I made a video from my side: https://dropmefiles.com.ua/en/QGN2 as you can see it looks like it works well.
Please send me a video from your side so I can try to replicate the issue.
Kind Regards
March 28, 2024 at 8:36 am #552923
refaParticipantYou can check the video from the below link. This issue only happens when I try to add a product to my wishlist for the first time after that, it’s working fine.
March 29, 2024 at 3:19 pm #553373
Luke NielsenKeymasterHello,
Okay, may I disable 3rd party plugins and enable the parent theme for testing?
Looking forward to collaborating with you!
Kind Regards
April 1, 2024 at 8:27 am #553743
refaParticipantPlease do..
April 2, 2024 at 9:17 am #554045
Luke NielsenKeymasterHello,
I apologize for the delay.
Could you please update the password: https://prnt.sc/wO_1a0LWqMnQ ?
Looking forward to hearing back from you!
Kind Regards
April 2, 2024 at 9:22 am #554048
refaParticipantHi,
Please find it below
April 2, 2024 at 2:22 pm #554227
Luke NielsenKeymasterHello,
In the
wp-content\themes\woodmart\inc\integrations\woocommerce\modules\wishlist\class-wishlist.php
file find theremove_unnecessary_products
function and replace it with the below code:public function remove_unnecessary_products() { if ( is_user_logged_in() ) { if ( ! get_user_meta( get_current_user_id(), 'wishlist_cleared_time', true ) ) { update_user_meta( get_current_user_id(), 'wishlist_cleared_time', time() ); } $wishlist_cleared_time = get_user_meta( get_current_user_id(), 'wishlist_cleared_time', true ); } else { if ( ! woodmart_get_cookie( 'wishlist_cleared_time' ) ) { woodmart_set_cookie( 'wishlist_cleared_time', time() ); } $wishlist_cleared_time = woodmart_get_cookie( 'wishlist_cleared_time' ); } $wishlist_cleared_time = intval( $wishlist_cleared_time ); if ( time() < $wishlist_cleared_time + DAY_IN_SECONDS ) { return; } foreach ( $this->get_all() as $product_data ) { $product_id = $product_data['product_id']; $wishlist_id = ! empty( $product_data['wishlist_id'] ) ? $product_data['wishlist_id'] : $this->get_id(); if ( 'publish' !== get_post_status( $product_id ) || 'product' !== get_post_type( $product_id ) ) { $this->remove( $product_id, $wishlist_id ); } } $this->update_count_cookie(); if ( is_user_logged_in() ) { update_user_meta( get_current_user_id(), 'wishlist_cleared_time', time() ); } else { woodmart_set_cookie( 'wishlist_cleared_time', time() ); } }
Kind Regards
April 3, 2024 at 12:20 pm #554539
refaParticipantThank you, it worked.
I put this code in my parent theme, if I update the theme in the future the function will go right? Is there any way to put this on a functions.php or child theme to avoid it?
Also, where can I find the single product page add to wishlist and homepage slider wishlist functions if I want to customize it?
April 4, 2024 at 5:44 pm #554991
Luke NielsenKeymasterHello,
The above code will be added globally in the next update so you do not need it in the child theme.
As for the customization of add to wishlist, you can find that functionality in
/inc/integrations/woocommerce/modules/wishlist/class-ui.php
Kind Regards
April 24, 2024 at 11:04 am #560185
refaParticipantHi,
The wishlist issue has not been resolved even after the last two updates I received. At least, provide a custom solution to resolve it. I am still facing the same wishlist issue with the variable products.
April 24, 2024 at 5:10 pm #560338
Luke NielsenKeymasterHello,
Firstly, please update the Core plugin and recheck the issue – https://prnt.sc/RE8g4p0zRvJC
Let me know the result.
Kind Regards
May 2, 2024 at 12:11 pm #562660
refaParticipantI updated the theme and core plugin. The issue is not resolved.
May 3, 2024 at 4:54 pm #563088
Luke NielsenKeymasterHello,
I have contacted the developer’s team and they told me that the above issue is included as a fix in the update.
Could you please clarify the current issue you have, is it the same as you described here – https://xtemos.com/forums/topic/product-variation-name-is-not-showing-in-wishlist/#post-552923 ?
Thank you for your time and patience.
Kind Regards
May 17, 2024 at 10:03 am #566194
refaParticipantThe issue isn’t fixed, and after the theme update “remove_unnecessary_products” this function was removed. Due to that, I am unable to add a product to a wishlist for the first time. Check the conversation number “#554227”.
May 20, 2024 at 12:45 pm #566699
Luke NielsenKeymasterHello,
Sorry for the inconvenience.
Please navigate to WoodMart -> Patcher and apply the
566695
patch to fix the issue.Thank you for your patience.
Kind Regards
May 20, 2024 at 1:59 pm #566716
refaParticipantI applied the patch, but it was still the same when I clicked add to wishlist a variation product from the single product page. Check the screenshot for the same.
Attachments:
You must be logged in to view attached files.May 20, 2024 at 2:21 pm #566721
Luke NielsenKeymasterHello,
The above patch was related to the first time added product to the wishlist issue.
As for that variation issue, please clarify this issue, did you mention above about it above? If yes, please send me a number of the thread message: https://prnt.sc/jtDw2GO7nIS3
Thank you for your time.
Kind Regards
May 20, 2024 at 2:35 pm #566731
refaParticipantI started the conversation regarding that, please check the message #547021.
May 21, 2024 at 10:16 am #567036
Luke NielsenKeymasterHello,
Understood. The answer was – https://xtemos.com/forums/topic/product-variation-name-is-not-showing-in-wishlist/#post-550777
The team is considering changing it in future updates.
Kind Regards
-
AuthorPosts
Tagged: wishlist
- You must be logged in to create new topics. Login / Register