Home › Forums › Themes Support › Claue › How to custom "you may also like"
- This topic has 8 replies, 2 voices, and was last updated 6 years, 11 months ago by orlane_azogui.
-
AuthorPosts
-
-
December 4, 2017 at 11:39 pm #14403
Hi,
When adding something to the cart, the “you may also like” section appears (see attached). But the products displayed are the most recent products I added on the website and not products that could be related to the product I was looking at.
Is there a way to customize this ?
Many thanks,
Attachments:
You must be logged in to view attached files. -
December 5, 2017 at 1:05 am #14406
Hi,
You can custom this area by edit the product and navigate to Linked Products and follow this screen shot http://take.ms/lROfx
Best regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 5, 2017 at 10:38 pm #14454
Hello,
Thanks for this answer.
I chose 3 linked product for this product : https://manora.co/produit/collier-elephant-acier-inoxydable/?preview=true but only three of them appear in “you may also like” section.
What can I do to have 4 products appearing ?
Thanks a lot,
Best,
Laurie
Attachments:
You must be logged in to view attached files. -
December 6, 2017 at 12:19 am #14460
Hi,
Could you try add more product in up-sells products?
Best regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 6, 2017 at 5:13 pm #14483
Hello,
Sometimes I have three, sometimes I have four, well I don’t want to add more for one hundred products because it’s too time consuming :(.
However, I have two more issues related to this.
First, The “you may also like” section does not only appears on cart page, it now also display on the product detail page before the related products section. Actually I would like to remove it to keep only the related product section but I still want them to appear on the cart page. How can I hide it for the product detail page please ?
Then, I figured out that everytime I put the same product in “upsell” and “related products”, then they only appear on “you may also like section” and I end up with less products in the “related product” section. To make myself clear :
Imagine a product A
Related products : X1 X2 X3 X4
Upsell : X1 X2 Y1 Y2
Then on product detail page, only X3 and X4 appear on related products section. They all appear on Upsell section.
What can I do to make them all appear even if they are the same ?
Thanks a loooot in advance !
Best,
Laurie
-
December 6, 2017 at 6:14 pm #14488
Hi,
You can hide “you may also like” by add custom css
.single-product .upsells { display: none;}
Best regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 6, 2017 at 10:50 pm #14504
Hello,
Ok I did it.
But for my other question, do you know what I can do ? Now if I have the same products in “upsell” and “related products”, they disappear in related products. As I have more than one hundred reference I would like to avoid do it again manually because it is quite time consuming.
Do you know if I can do something for that ?
Thanks
Best,
Laurie
-
December 6, 2017 at 11:19 pm #14510
Hi,
Please install claue-child.zip included in package downloaded from ThemeForest and try add below code to claue-child > functions.php to hide up sell section on product detail page
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 );
If it still hide products you add for up sell in related section, you have to hide related section and show “you may also like” section by add below code to functions.php
remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_upsell_display', 15 ); remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_related_products', 20 ); add_action( 'woocommerce_after_single_product_summary', 'related_upsell_products', 15 ); function related_upsell_products() { global $product; if ( isset( $product ) && is_product() ) { $upsells = $product->get_upsells(); if ( sizeof( $upsells ) > 0 ) { woocommerce_upsell_display(); } else { woocommerce_upsell_display(); woocommerce_output_related_products(); } } }
https://gist.github.com/roykho/1062c708af772412fe7e
Best regards
Harry
Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio -
December 7, 2017 at 6:15 pm #14534
Hello,
Thank you for your help,
Best,
Laurie
-
-
AuthorPosts
You must be logged in to reply to this topic.