Details

Related Products for WP e-Commerce uses information available within the Single Product template to display related Products that belong to the same Product Category.

WP e-Commerce Compatibility

  • WP e-Commerce 3.7 ready (up to 3.7.8)
  • WP e-Commerce 3.8 ready (up to 3.13.*)

Updates

The latest release can be downloaded from yourย My Accountย page.

Documentation

Looking for support, a copy of the readme, Plugin updates, Ideas or usage instructions? Check out ourย Documentation for Related Products.

Screenshots

Comments

  1. Stephan Boehme DE Stephan Boehme

    Hi Micha ist it possible to display related Products on a normal single Post on Frontend? Is it possible to Include the Related Product Panel on Single Post Backend?

    Thx
    Stephan

      • stephanboehme DE Stephanboehme

        Hi Michael

        any news about Related Products on a Single Post?
        Best regards

        • Michael Visser au Michael Visser

          Hi stephanboehme, thanks for the reminder. It’s in my Job queue, hoping to sneak this into the next Plugin update along with some SQL optimisation for large store catalogues. ๐Ÿ™‚

  2. Ollie GB Ollie

    Hi,

    Is it possible to order the products alphabetically in the back end?
    They appear to be listed latest first and it’s hard to find products sometimes when manually specifying which products are related.

  3. Ed Mazur US Ed Mazur

    Hi Michael,

    Related Products works great, but it does not display prices correctly if a product has variations and the price has changed. See http://notforsalestore.com/store/mens/not-for-sale-tee/ and look for the link to “Free Slaves Tee” – click it and you see the price does not match what is shown in More Ideas (Related Products). The only workaround is to de-select all variations, then update the product’s price and re-select the variations. For products with lots of variations, this is not an acceptable workaround.

    The problem seems to stem from the heirarchal nature of variations. Your plugin’s wpsc_rp_product_price() function seems to only look for the parent price, whereas wpsc_the_product_price() considers variation pricing.

    • Michael Visser au Michael Visser

      Hi Ed, I think the best way to do this in the meantime is to show a ‘Show options’ button/link or ‘From …’ value. I’ll take a look at how I can use wpsc_the_product_price() within Related Products.

      • Ed Mazur US Ed Mazur

        “Fromโ€ฆ” and “Show options” aren’t good alternative if all variations are the same price.

        I did some coding and came up with a workaround. In place of wpsc_rp_product_price ($product->id) ,use the following code.

        $loop = new WP_Query( array(
        ‘post_type’ => ‘wpsc-product’,
        ‘p’ => $product->id
        ) );

        while ( $loop->have_posts() ) : $loop->the_post();
        $price = wpsc_the_product_price();
        if ($price == ‘ $0.00’ ) {
        wpsc_rp_product_price ($product->id);
        }
        else echo $price;
        endwhile;

        It simply creates a new query for each related product based on $product->id and calls wpsc_the_product_price on the new query. For some reason it was returning $0.00 for the price if the product does not have variations, so I used wpsc_rp_product_price () as a fallback

        • Michael Visser au Michael Visser

          Hi Ed, nice one! I’ve baked this into the minor Plugin update due this weekend. Just finalising the Plugin update process and knocking off a few to-do’s before testing and release. ๐Ÿ™‚

          • TR US TR

            Can I test pretty please?

            • Michael Visser au Michael Visser

              No need, 1.9.8 is ready to go and it’s got a similar patch to what Ed provided below; works a treat here for standard and variation-based Products. ๐Ÿ™‚

          • Ed Mazur US Ed Mazur

            I did some additional testing and found that in some cases it was still displaying the old pricing, while at other times the same product would display the right pricing! So I tried using the wpsc_have_products () loop rather than the WP loop and it fixed things. This required using the $wp_query object so this code temporarily backs up, rewrite, then restores it for each product. This also eliminated the problem of $0.00 pricing that required wpsc_rp_product_price () as a fallback.

            So at the beginning of the Related Products template

            <?php if( $products ) {
            global $wp_query;
            $temp_query = clone $wp_query; //Backup of original Query

            Then in places of wpsc_rp_product_price ():

            $wp_query = null; //reset the query results
            $wp_query = new WP_Query( array(
            ‘post_type’ => ‘wpsc-product’,
            ‘p’ => $product->id
            ) );

            while ( wpsc_have_products () ) : wpsc_the_product ();
            echo wpsc_the_product_price();
            endwhile;

            Then at the very end –

            $wp_query = $temp_query; // reset to original query
            wp_reset_postdata();
            } ?>

  4. TR US TR

    Anyone else having issues with Variations and the latest release 1.9.7? Mine are not displaying with manual embed.

    • TR US TR

      Michael,

      Can you confirm this?

      Thank you.

      • Michael Visser au Michael Visser

        Hi TR, as above. I’m looking into this. ๐Ÿ™‚

        • TR US TR

          Thank you…this seems to be isolated to if my single product page has related products displayed with the “add to cart” button enabled, then the variations for the primary product vanish all together. If I disable the ‘add to cart’ button then my variations work as normal .

          Cheers,

    • Michael Visser au Michael Visser

      Hi Kieran, please download 1.9.7. I’ve added a few other fixes.

      You can use the manual positioning support to place the Related Products element anywhere on the Product page. ๐Ÿ™‚

  5. James AU James

    This is exactly what I was looking for, can I see it in action?

    Do you have an example site to show it working? Maybe someone has a site they would like to show off? ๐Ÿ™‚

    • Michael Visser au Michael Visser

      Hi James, I haven’t set up any test sites for Related Products yet. With almost 300 sales of this Plugin alone I’m confident there’s a ‘few’ sites in the wild. Store owners feel free to link up!

      I just went over past e-mails and couldn’t find any refund requests for Related Products which has to be a good indication too. Hope this helps. ๐Ÿ™‚

  6. Jean-Francois Arseneault CA Jean-Francois Arseneault

    I’m building a store using WPEC 3.8.6 and WPML 2.3.x (latest). But it seems your plugins don’t play nice with WPML.

    Even though the translated product names do show up in the list of ‘related products’, when I click them, my selection doesn’t stick and it’s the original language (English) product which remains.

    I know many developers (and WPEC) now include hooks to ‘play nice’ with WPML, and only show the current language items. Can we expect your plugins to follow WPEC on this?

    Thanks

    (else, any suggestion on how to make this work?)

    • Michael Visser au Michael Visser

      Hi Jean-Francois, I have not had experience with WPML but am happy to work with your store to add support where needed ๐Ÿ™‚

  7. peter US Peter

    im wondring if this plugin can fit my needs, or be tweaked to do so ๐Ÿ™‚

    i want to put it in the ajax popup that shows after an item has been added to cart (“continue shopping | checkout). i dont have many products so i want it to be something like “youve added product A to your cart, check out product B its goes well together” then the click and go to product B’s page and add that and it says “check out Product C too!”

    i guess the second part sounds possible from manual related products feature, but can we hook into the ajax popup? im using thematic by the way.

    thanks!

      • peter US Peter

        alright! im not that good with jquery atall though, and would be willing to sponsor this finically if you or anyone out there can do it, as its for a client who will need it quite soon.

  8. Jean-Francois Arseneault CA Jean-Francois Arseneault

    Michael, I was running into a problem where if I selected a single related product, it wouldn’t show on my product’s page.

    Is it possible that you forgot to add an ‘equal’ (=) sign after the ‘larger than’ (>) sign at line 153 of includes/release-3.8.php?

    Once I added that in, that solved my problem, but wanted to validate if it wouldn’t have adverse effects on other functions…

    • Michael Visser au Michael Visser

      Hi Jean-Francois, spot on, I’ve got a new Plugin update just about ready to come out so will patch that. ๐Ÿ™‚

  9. Ed Mazur US Ed Mazur

    Hi Michael,
    I just bought Related Products and it works great! However I was hoping there is a way to customize the output more. For example, it has options to wrap the output in a table or a list, but I don’t want these. I have a jQuery slider that needs very specific formatting to work. Is there any way to change the output without hacking the core files or complex jQuery?

    • Michael Visser au Michael Visser

      Hi Ed, you can copy one of those layouts to your WordPress theme then edit it to your hearts content. I suggest using the unordered list as a sample as it’s very easy to use as a base. ๐Ÿ™‚

  10. pau1phi11ips GB Pau1phi11ips

    Hi Michael,

    I had this plugin working awesome on my test server but moved it over to my working server and it shows no related items at all. It’s look like the “foreach $product as $products” loop isn’t outputting anything.

    The main difference between the servers is that the working server is on PHP 5.1 and my test server is 5.3, the security is obviously tighter on the working server too.

    Just to give me a head start in problem finding, could you let me know if there’s some of the code that’s incompatible with PHP 5.1 please?

    Thanks, Paul.

    • Michael Visser au Michael Visser

      Hi Paul,

      I’m sorry to hear you’re having headaches between PHP versions. I’m not aware of any incompatibility between the two versions. If you can send me login details (FTP and WP Admin) I can trap this issue and release a minor Plugin update to patch future versions of Related Products.

      • pau1phi11ips GB Pau1phi11ips

        Hi Michael,

        I had abandoned this job for a while and have fixed it today. I think the problem is with the PHP version running on the server. We’re not in a position where it can be updated either.

        Anyway, I’ve edited line 224 of includes/release-3_8.php;

        From;
        $products = array2obj( $products );

        To;
        $products2 = array();
        foreach($products as $product)
        $products2[] = array2obj( $product );
        $products = $products2;

        Basically, it was failing to display anything on the frontend when it was running through the foreach ($products as $product) loop in the template file as the containing array was converted to an object. The code above keeps it as an array of objects instead of a single object with member product objects.

        I don’t suppose this could be submitted to the main code if it works ok for you?

        Thanks, Paul.

  11. Luke AU Luke

    Hey Michael, I’ve managed to get the price pulling in for related products by adding in this function:


    function wpsc_rp_price($product_id){
    $price_query = new WP_Query('p='.$product_id.'&post_type=wpsc-product');

    while ($price_query->have_posts()) : $price_query->the_post();
    $the_price = wpsc_the_product_price();
    endwhile;
    echo $the_price;
    }

    And in the related products theme file, calling:

    wpsc_rp_price($product->id);

    However, when on a single product page that has variations, the price is showing as ‘From: $0.00’ for all the related products.

    Any ideas how this can be fixed? Would be good to see a price option in the next release ๐Ÿ˜›

    • Michael Visser au Michael Visser

      Hi Luke, great suggestion. I’ve just implemented variation support for my Wholesale Pricing Plugin (http://www.visser.com.au/wp-ecommerce/plugins/wholesale-pricing/) so am up to par with how Product variation pricing is presented on the Product page/single Product page. I’ll take a look at this and get it cooked in the next Plugin update. ๐Ÿ™‚

      • Luke AU Luke

        Great stuff Michael, that’s what I like to hear. I will just sit back and let your genius do it’s thing then!

    • Michael Visser au Michael Visser

      Hi Luke, forgot to include support for this in 1.9.2, doing this now and will launch 1.9.3 in a moment ๐Ÿ™‚

      • Luke AU Luke

        Works perfectly mate, well done!

        On a side note – I noticed in the last version and also this version that the auto related products werent bringing in products based on the category. To fix this I added above the auto related products query:


        $wpsc_product_category = get_the_product_category( wpsc_the_product_id() );
        if ($wpsc_product_category) {
        foreach ($wpsc_product_category as $wpsc_product_category) {
        $categoryname = $wpsc_product_category->slug;
        }
        }

        and then inside the query:


        'wpsc_product_category' => $categoryname,

        Might be a better way to do this, not sure!

        • Michael Visser au Michael Visser

          I’ll take a look at it, probably is! I’m going to overhaul how that works with per-Category controls too ๐Ÿ™‚

  12. Simon Tayler ZA Simon Tayler

    Hey there.
    Great Plugin.
    Is there any way to only show “Related Products” from within that category?
    Eg. Only show related products from: “Mens” or “Mens T-Shirts”?

    Thanks!

    • Michael Visser au Michael Visser

      Hi Simon, that’s how Related Products works by default, it will automatically display Products from that Products Category, otherwise you can manually select Products from a list of Products. ๐Ÿ™‚

      • Simon Tayler ZA Simon Tayler

        Hi Michael, on my version it just displays random products from everywhere. Take a browse of my site.
        It’s quite annoying. I just can’t figure it out.

    • Brent Williamz AU Brent Williamz

      Simon, that’s one heck of a great shopping site. Is it all done in WordPress with WPEC & other plugins?
      Can you contact me using brent at sunshinecoastlocals dot com dot au, please?
      I just have a couple of related questions, thanks, mate.

  13. Yan ID Yan

    hi mike,

    i just buy the wish list and related product plugins, wanna ask how do take out the yellow box of notification from wishlist plugin coz shown on all my pages. and how do i resize the related product thumbnail?? can you mail me your answer??

    thanks mate

    • Michael Visser au Michael Visser

      Hi Yan, by default those styles are loaded with the Plugin, I’ll release a Plugin update to optionally load/unload that CSS file so you can use your own styling. As for thumbnail sizing I’ll look at this too, I suggest a control for the Settings page too for this feature.

      • Conor AU Conor

        1.9 = nioce ๐Ÿ˜‰ still not too clear on how to change the image size though… Can anyone help me out. Thanks Conor

        • Conor AU Conor

          True to form, when I post a question – the next night I figure it out??? ;P

          • Graham AU Graham

            Conor, would you shed some light on the solution to this please? ๐Ÿ™‚

            • Graham AU Graham

              I’ve tried manually setting the width and height of the thumbnail and it appears with the right dimensions, but since the plugin calls the image using wp_get_attachment_image, it just shows a cropped version of the non-square thumbnail.

              • Michael Visser au Michael Visser

                Hi Graham, I’ll take a look into this ๐Ÿ™‚

              • Conor AU Conor

                Sorry Graham, I have been out of action for a while… The things that got it eventually working for me was when I went into Settings>Media and changed the Thumbnail size there.
                Hope this helps?
                BTW: Nedved???? c’mon… ๐Ÿ˜‰

                • Graham AU Graham

                  Nice, thanks for that Conor.

                  Haha, don’t be a hater man ๐Ÿ™‚

              • Michael Visser au Michael Visser

                This should be sorted as I’ve tinkered with the thumbnail sizes in the latest Plugin update ๐Ÿ™‚

  14. Amel US Amel

    I have to say, I am a little disappointed with the slow follow up to my question regarding the functionality of this plugin but I will try one more time before I move on.

    I noticed that many of the descriptions and information are about placing relative products that are in the same category. What if I wanted to place related products in different categories? An example would be that I have a website that sells building material and I have a category โ€œRoofโ€ and โ€œWindowsโ€ and want to cross sell windows when someone is looking at roofs and roofs when someone is looking at windows.

    Is this possible with your plugin?

    • Michael Visser au Michael Visser

      Hi Amel, apologies for being slow to respond, I’ve been sweating code in the form of new Plugins and Plugin updates across the suite. You can manually assign Related Products within the Add/Edit Products page, I’ll be looking to add per-Category controls to better manage the auto selected rotator.

      • Amel US Amel

        Great to hear back from you. You have a nice list of plugins and I am excited that you are making upgrades. Thanks for the follow up.

Add a comment

Before you comment - Do you have a support request? If so, this is not the right place to post it. Please submit support requests for Premium Plugins on the Support page and in the community Support Forums for free Plugins.

FAQ

What does this Plugin do?

Related Products is a WordPress Plugin to extend the WP e-Commerce Plugin by displaying related Products to site visitors, this provides a cross-selling opportunity to other Products available from your store.

It automatically selects related Products based on the Category that the currently displayed Product belongs to, support is also included to manual specify which related Products to display. This has the advantage of displaying? a 'set' of Products (e.g. Silver necklace, silver bracelet, silver watch, etc.).

Can I manually define what related Products are displayed against each Product?

Yes you can using the simple Related Products widget appearing on the Add/Edit Products page, just select the Products you wish to display and save changes. Read more about this feature on the Usage page for Related Products.

Does the current Product being displayed appear in the Related Products?

Nope, Related Products filters out the current Product from the list of available Products to display.

Can I change the positioning of Related Products on the Product detail page?

Related Products uses the standard templates 'hooks' that comes with WP e-Commerce to display the Related Products element. You can manage the position by the Position drop-down option within Store > Upgrades > Related Products, that's not all, you can even use a template tag for absolute control. Read the Usage page for more information.

Support

Related Products comes with a Quick Start document (readme.txt) to help with installing the Plugin. Additional support can be found from theย Contactย page or methods below.

Urgent Support

If you find yourself needing immediate support for your purchase use theย Premium Supportย page or Live Support button.

Related Products Forum

If you have any problems, questions or suggestions please join the members discussion on our Related Productsย forum.

Roadmap

As the end-user youโ€™re driving this Pluginโ€™s future. Vote for a feature enhancement and/or suggest features in the Comments section.

[poll id="8"]