Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #8139

    Hi there,

    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/black-tie-coconut-milk-soap

    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.

    Thanks,

    Bryan Vorel

    Vorel Designs

    #60447

    Hey,

    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:

    function avia_woocommerce_output_related_products()
    {
    global $avia_config;

    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
    echo "</div>";
    }

    #60448

    Has this problem been fixed yet? I am interested in having only specific products show on each product page.

    #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… ;-)

    #60450

    How do you hide the related products?

    #60451

    just comment out the code that Dude posted above and they are gone ;-)

    #60452

    Martin, comment out – does that mean “place inverted commas around the code above?” <like that?

    #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, like

    Code:
    // 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.

    #60454

    You can use // like Martin suggested above or /* */ for code blocks like:

    <?php

    // one line comment

    /*
    some lines
    some lines
    some lines
    some lines
    some lines
    some lines
    */

    ?>

    #60455

    Ok, thanks for clarifying – of the problems I’m having at least this one looks fixable!

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

The topic ‘Related Products’ is closed to new replies.