Product Description

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.9.*)

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.

Reviews

Woops... we might have borked Plugin comments since our recent WooCommerce migration. :(

We're working hard to get comments and reviews working again. If you have a question or require pre-sales support ask us on our Facebook Page.
  1. :

    Hi Michael

    Apologies if this message if duplicated – my browser timed out when submitting it.

    I’m very interested in this product, but I use Pages and a shortcode to display the cart features for WP e-commerce.

    First of all, is this a plugin that displays a widget? Could I create a sidebar and drop the widget in, allowing to display the related products? How does it know what’s related and what is not?

    Have you got a plugin that does something similar; i.e. Others bought…

    • :

      Ignore my message – the FAQ tabs answered all of my questions!

      Teaches me to jump straight in :)

      • (verified owner):

        Hi AJ, no problem at all. I’ll be adding “Others brought…” integration into this Plugin as it currently uses the currently displayed Product’s Category and Tag data to generate suggestions.

  2. (verified owner):

    Hi. Is there a way to change the size of the related products thumbnails? THX

    • (verified owner):

      Hi Lindsey, currently Related Product uses a fixed thumbnail but what I’ll add a dropdown menu of available options since WP e-Commerce 3.8 gets WordPress to dynamically generate the required thumbnail sizes.

      • :

        Dear Visser. We bought this plugin time ago. Now I want to upgrade since qe upgrade the WP E-comemrce version (to the last one) but I can’t access the download area with the right SessionID … so please, i hae wrote you like 3 times with no answer, please we need the upgrade because the version we got simply is not working… Thanks in advance!

  3. (verified owner):

    Hey, the plugin works GREAT! Thank you :)

    I have a new feature request: I would like to show Related Products on the shopping cart page, for all products in that cart. Is that possible?

    • (verified owner):

      Hi Jackie, great suggestion. There’s a topic in the Ideas section for this feature, Ill see what can do.

      • (verified owner):

        Awesome, thank you! Please keep me updated (or post link to the topic).

  4. (verified owner):

    Along with the “Add To Wishlist” plugin, this plugin also has significant functionality issues with the latest stable WPEC release. Specifically for this, the related products all link to the same page. As a paid customer, I really hope we can get support for these issues soon.

    • (verified owner):

      Solved a few issues.

      Thanks to jackharrybill’s suggestion for fixing update problems in the “Add To Wishlist” plugins, I’ve found that there is a similar cause for issues in this plugin.

      This should fix issues with all related products linking to the same page.

      Change all instances of lowercase “->id” to uppercase “->ID” in the template file of focus. In my case it was the “…/templates/store/wpsc-single_product_related_table-horizontal.php” file.

      Hope this helps.

    • (verified owner):

      Hi baseofficial, an urgent fix has been issued for both Add to Wishlist and Related Products. Going forward I’m making changes in the way support is maintained and commit to resolving this immediately.

  5. (verified owner):

    I am having some issues with this plugin. First, upon install, I got an error for “undefined call array2obj in line 28 of release_3.8.php. When i got deleted that array2obj line, the plugin started working. I am not sure what I deleted.

    Second, now I am seeing the related product on a single product page (i.e., http://apartmentprinter.com/products-page/print-products/temlum-business-cards/) but the links for the products don’t go to the related product page, it just links right back to the same product the customer is on.

    Third, if I set it for more than 2 products to show, the layout goes haywire, primarily I think because the product titles are showing to the right of, rather than below or above the image. How do I change that?

    Lastly, I would like to show related products of the items in the shopping cart in the checkout page ( http://apartmentprinter.com/products-page/checkout/). Is there anyway, I can get this plugin to recognize the products in the cart on the checkout page, and recommend related products?

    I appreciate any help you can give me! In fact, I wouldn’t mind subscribing to a premium support if you can help resolve these issues for me.

    • :

      Hi Ray,

      I am having the exactly same problems. I get Fatal Error: call to array2obj and the links pointing to the same product page. Here’s how I fixed the error:

      if(!function_exists(‘array2obj’)) {
      function array2obj($array) {
      return is_array($array) ? (object) array_map(__FUNCTION__,$array) : $array;
      }
      }

      Place the above code at the bottom of your theme’s functions.php file and the error message will disappear. Also if there is an update to the plugin, this will not cause conflicts if the function already exists etc. However, this does not solve the issue of broken links!

      This should have been tested prior to release and it should simply work out of the box – the fact that it doesn’t work for more than 1 person suggests it has not been thoroughly tested and is extremely worrying to say the least, not to mention disappointing as this is a premium plugin and you have not received a (public) response after more than 2 weeks.

      There is a drop-down menu to change how the products are displayed, I.E vertical, horizontal etc. on the settings page. You may need to write some CSS to get this to display exactly as you require however.

      The shopping cart related product AFAIK is not possible with this plugin. I’d imagine this will require custom development or use of a different e-commerce plugin.

      • (verified owner):

        Hi Gavin, you’re spot on, the last Plugin update was not thoroughly tested and slipped through the net. I’ve been offline this past fortnight due to travel and haven’t been able to assist the community.

        I’m releasing an urgent Plugin update promptly including the patch above as well as a fix for broken links. I’ll be making an announcement later in the week after reviewing how to better support the community which I have taken for granted.

    • (verified owner):

      Thanks to jackharrybill’s suggestion for fixing update problems in the “Add To Wishlist” plugins, I’ve found that there is a similar cause for issues in this plugin.

      This should fix issues with all related products linking to the same page.

      Change all instances of lowercase “->id” to uppercase “->ID” in the template file of focus. In my case it was the “…/templates/store/wpsc-single_product_related_table-horizontal.php” file.

      Hope this helps.

      • :

        @baseofficial

        Your solution works perfectly – thank you.

  6. :

    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.

    • (verified owner):

      Hi xoeve, I’ll have a play with non-square images, I know there’s some control available within wp_get_attachment_image so will see what I can do! :)

  7. (verified owner):

    Hi Michael,

    Have you ever had any issues with ‘related products’ slowing down a site? checkout this link
    http://41orchard.com/new/shop/tree-wall-decals/silhouette-branch/

    Notice It takes ages to load, but when I disable ‘related products’ it loads way faster. Also when I change the css file from the default it seem the site runs quicker also.

    This has only recently occurred and it was fine before so I’m thinking that this is conflicting with something else, but I have definitely traced that slow load time down to this plugin as the site runs completely differently when its disabled. Do you have any ideas on this?

    Thanks
    Tom

    • (verified owner):

      Hi Tom, if you can confirm what version of WP e-Commerce and that you’re running the latest Plugin update I’ll do some testing here and confirm. :)

      • (verified owner):

        Thanks Michael,

        WP E-commerce 3.8.7.2
        RP 2.0.2

        I’ve got this same set up on another testing domain and its working fine, just cant see why its conflicting on this one

        Cheers!

      • (verified owner):

        Hi Mate, Bit of info on this for you…

        I’ve found that the more product’s I add to my site, the slower the the single product page takes to load…this is only an issue when ‘Related Products’ plugin is activated.

        But now I have found that it is only slow to load products that have ‘Use automatic selection of Related Products’ checked. If I manually assign the related products, the single product pages load heaps quicker…not sure if its a theme/WP E-commerce or plugin thing but that’s what I’ve found…

        Tom

    • :

      Tom,

      I am noticing the same issue you have described. I am fully up to date on this plugin, WordPress, and WP e-Commerce. I recently imported hundreds of products to test out a website I am working on. The products also have numerous custom fields via the Custom Fields plugin, which may be contributing as well. The bottom line, though, is that this plugin is single-handedly bringing my entire server down.

      Michael,

      Running “mytop” (top running MySQL queries utility), I can see that the culprit is the query on line 180 of includes/release-3_8.php:

      SELECT p.ID as ID, p.post_title as post_title
      FROM $wpdb->term_taxonomy AS tt, $wpdb->term_relationships AS tr, $wpdb->posts AS p, $wpdb->postmeta AS pm
      WHERE
      p.ID != " . wpsc_the_product_id() . "
      AND p.post_status = 'publish'
      AND p.post_type = 'wpsc-product'
      AND
      (
      (
      tt.taxonomy = 'wpsc_product_category'
      AND tt.term_taxonomy_id = tr.term_taxonomy_id
      AND tr.object_id = p.ID
      AND tt.term_id IN ( " . $category_list . " )
      )
      )
      GROUP BY tr.object_id
      LIMIT $limit;

      This query runs for hundreds of seconds on my server before finally completing (e.g., 500+ seconds). I am not an SQL expert, and indeed it took me hours to even pinpoint the problem. Can anything be done to make this more scaleable?

  8. (verified owner):

    I’ve had this issue on 2 sites where for any item i have duplicated the product them is missing the the related products section.. is this something you can fix in the plugin?

    It doesnt print the image at all.. the only code shown is the link;

    • (verified owner):

      any change this can be looked at?

      • (verified owner):

        Hi Nicole, can you get in touch with me regarding this. I’ve been unable to reproduce this. Thanks Nicole. :)

  9. (verified owner):

    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

    • (verified owner):

      Hi Stephan, currently Related Products depends on the Product page within WP e-Commerce. I’ll create a new function in the next Plugin update so you can provide a Product ID and it will ‘act’ as if it is on a Product page. :)

      http://www.visser.com.au/forums/topic/add-template-tag-for-displaying-related-products-on-single-posts/

      • (verified owner):

        Hi Michael

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

        • (verified owner):

          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. :)

  10. (verified owner):

    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.

  11. :

    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.

    • (verified owner):

      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.

      • :

        “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

        • (verified owner):

          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. :)

          • :

            Can I test pretty please?

            • (verified owner):

              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. :)

          • :

            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();
            } ?>

  12. :

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

    • :

      Michael,

      Can you confirm this?

      Thank you.

      • (verified owner):

        Hi TR, as above. I’m looking into this. :)

        • :

          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,

  13. (verified owner):

    Hi Michael

    I bought this plugin and installed. It’s putting some weird numbers above the related products:

    http://shop.itsnotforgirls.com/browse/adidas-sneakers/adidasthe-adi-rise-mid-sneaker-in-light-maroon-sneakers-for-men/

    Also, is there any option to put this below the buy now button ?

    thanks

    • (verified owner):

      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. :)

  14. :

    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? :)

    • (verified owner):

      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. :)

  15. (verified owner):

    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?)

    • (verified owner):

      Hi Jean-Francois, I have not had experience with WPML but am happy to work with your store to add support where needed :)

      • (verified owner):

        Thanks! If you could take a look at this page for plugin developers to integrate WPML into their code, and let me know how I can help. I’m glad to do alpha-testing for the code, let me know what else I can help with!

  16. :

    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!

    • (verified owner):

      Hi Peter, you could definitely hack the Plugin to do this. From what I understand about jQuery you just need a wrapper for it then trigger it on the Add to Cart event. I’ll add this as an Idea to track development but it’s not on the roadmap.

      http://www.visser.com.au/forums/topic/add-jquery-popup-for-related-products-after-add-to-cart/

      • :

        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.

  17. (verified owner):

    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…

    • (verified owner):

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

  18. :

    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?

    • (verified owner):

      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. :)

  19. (verified owner):

    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.

    • (verified owner):

      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.

      • (verified owner):

        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.

  20. :

    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 :P

    • (verified owner):

      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. :)

      • :

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

    • (verified owner):

      Hi Luke, forgot to include support for this in 1.9.2, doing this now and will launch 1.9.3 in a moment :)

      • :

        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!

        • (verified owner):

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

  21. :

    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!

    • (verified owner):

      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. :)

      • :

        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.

    • :

      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.

  22. :

    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

    • (verified owner):

      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.

      • (verified owner):

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

        • (verified owner):

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

          • (verified owner):

            Conor, would you shed some light on the solution to this please? :)

            • (verified owner):

              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.

              • (verified owner):

                Hi Graham, I’ll take a look into this :)

              • (verified owner):

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

                • (verified owner):

                  Nice, thanks for that Conor.

                  Haha, don’t be a hater man :)

              • (verified owner):

                This should be sorted as I’ve tinkered with the thumbnail sizes in the latest Plugin update :)

  23. :

    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?

    • (verified owner):

      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.

      • :

        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.

Only logged in customers who have purchased this product may leave a review.

Comments

Woops... we might have borked Plugin comments since our recent WooCommerce migration. :(

We're working hard to get comments and reviews working again. If you have a question or require pre-sales support ask us on our Facebook Page.