Recommended Products Intro and Settings
Table of Contents
Settings
Once the Recommended Products extension is installed and activated, you can navigate to Downloads → Settings → Extensions → Recommended Products. Here you will have the ability to choose from several options on how you want the extension to function.
Show on Downloads – Checking this box will make the recommended products display on individual product pages.
Show on Checkout – Checking this box will make the recommended products display on the checkout screen.
Number of Recommendations – Determines how many recommended products are shown.
Show Free Products – Checking this box will allow free products to be included in the recommendations. By default free products are excluded.
Templates
Recommended Products includes two template files that can be customized by copying them to your theme’s edd_templates directory, as shown in the Moving EDD templates to your theme documentation.
To use the template files, copy the files from /
edd-recommended-products/templates/ to /wp-content/themes/YOURTHEME/edd_templates/ and then modify as desired.
Single Item Recommendations:
To get the recommendations for a single page (single.php download post type), use the supplied single_recommendations.php template as a guide to isolate the recommendations for this specific item. If desired, you can also supply the logged in user ID as a 2nd argument toedd_rp_get_suggestions()
to remove items the current user already owns. In the default template this is not enabled, and users will see items they have purchased in the Single view.
Checkout Page Recommendations:
This page uses all items currently in the cart to build a recommendation profile. You can use the supplied checkout_recommendations.php template as a guide to get the recommendations profile, and if desired specify the currently logged in user ID as a 2nd argument toedd_rp_get_multi_suggestions()
to remove items the current user already owns. In the default template this is enabled to prevent a user from buying items again, since they are 1 step away from final checkout.
Filters
Recommended Products includes several filters that can be used to adjust the extension’s behavior. These filters are for developers who are familiar with WordPress Hooks and Filters.
edd_rp_log_query_args
– Alter the number of logs used to determine recommendations (default is 250).edd_rp_single_recommendation_count
– Alter the number of recommendations for a single product.edd_rp_single_recommendation_results
– Allows you to filter the recommendations for a single product.edd_rp_multi_recommendation_count
– Alter the number of recommendations for the multi product viewedd_rp_multi_recommendation_results
– Allows you to filter the recommendations for the multi product viewedd_rp_suggestion_counts
– Add items to the recommendations count dropdown.edd_checkout_image_size
– Image size used for post images in the default recommendations templates.edd_recommended_products_languages_directory
– Alter the location for language translationsplugin_locale
– Alter the locale being used.
Shortcodes
Recommended Products, includes a shortcode to allow for the recommendations to be placed within page/post content as you’d like. An example of this shortcode is:
[recommended_products ids="24, 41" count="10" title="We Also Recommend"]
The list of attributes (and their defaults) are:
- ids: a comma separated list of Download IDs to provide suggestions for (default: current post ID)
- user: “true” or “false”, whether to hide already purchased items from displaying (default: false)
- count: number of suggestions to show (default: 3)
- title: A title to display (default: “Recommended Products”)
Troubleshotting
Occasionally you may find that you have no recommendations. Below are some common reasons.
Reason 1: Not Enough Data
Recommended Products analyzes the last 250 purchases on the site (every night) and, based on those purchases, suggests other products that users have also purchased. This means that if your store is quite new, has been recently reset, or has very few transactions, you may not see any recommendations right away.
Reason 2: Already Purchased
On the checkout page, if the user is logged in and already owns a product, that product won’t be recommended to them, even if it met criteria to be recommended. This makes room for other products that the customer may be interested in buying.
Reason 3: Lack of Theme Support
Some themes simply choose not to render the Recommended Products on the Checkout page.
More generally, the Recommended Products extension relies on some hooks provided in the default EDD templates. If those templates are edited and/or those hooks are removed, no recommendations will be printed.