January 11, 2012 at 5:53 pm #8139
I have finished building a site using this theme and have some questions concerning the Related Products. I will use this page as an example: https://lotussoap.com/shop/ (Purchase code hidden if logged out)
At the bottom of this page you will see “Related Products”. This is pulling in random products and not necessarily actual “Related Products”.
First, how do I change this to actually show the correct “Related Products”?
Second, could I manually add certain products to this page that I want to show and not at random?
Third, where does the page actually live? Is it part of the “Shop” page? ( I hope that makes sense ) Just in case I wanted to add some other elements to this page.
Vorel DesignsJanuary 12, 2012 at 8:17 am #60447
1) The problem is that wordpress can’t decide what’s “related” – it just shows posts based on certain criterias. In this case woocommerce decides which products are related (we use the function: “woocommerce_related_products”).
2) For now you can’t change the related products – i.e. see: https://github.com/woothemes/woocommerce/issues/428 because woocommerce doesn’t offer any hooks you could use to modify the function.
3) All theme related code can be found in abundancewoocommerce-configconfig.php – the related products are implemented with following lines:
echo "<div class='product_column product_column_".$avia_config['shop_single_column']."'>";
woocommerce_related_products($avia_config['shop_single_column_items'],$avia_config['shop_single_column']); // 4 products, 4 columns
}February 18, 2012 at 12:18 am #60448
Has this problem been fixed yet? I am interested in having only specific products show on each product page.February 18, 2012 at 12:27 am #60449
that problem seems to be WooCommerce-related, got nothing to do with Abundance.
AFAIK people have been asking about this a lot in WooCommerce support and something is in the works, but that might still be a few releases from now….
For the time being I for one have resorted to display no (un)”related” products at all. Instead I use the cross/upsell options to manually define really related products. A bit more work, but results in really targeted cross-sells and less bored customers – nobody looks at “related” products anyways, because most found out that they are rarely related, but shop owners just use this feature to spam more stuff at the visitor’s eye.
If you have only one or two really related products, and not on all product pages, people might actually look and eventually even buy… ;-)February 18, 2012 at 5:44 pm #60450February 18, 2012 at 5:49 pm #60451
just comment out the code that Dude posted above and they are gone ;-)February 20, 2012 at 1:08 pm #60452
Martin, comment out – does that mean “place inverted commas around the code above?” <like that?February 20, 2012 at 1:59 pm #60453
Err, have to think everytime myself…;-)
in php files it is two slashes in front of each line, so that the line becomes a comment and is not executed, likeCode:// this line will now be a comment
Of course you can also make a backup copy of the file and just delete the part of the code that you do not want.February 20, 2012 at 2:53 pm #60454
You can use // like Martin suggested above or /* */ for code blocks like:
// one line comment
?>February 20, 2012 at 4:14 pm #60455
The topic ‘Related Products’ is closed to new replies.