Automatically create price comparison sets for your WooCommerce products or by using a shortcode.
The Datafeedr Comparison Set plugin automatically creates price comparison sets for any product in your WooCommerce store or by using a shortcode.
Heads-up! — This plugin requires that you have an active subscription to one of our API plans. Purchase Subscription.
For personal-use only. Please contact us if you have any questions.
Requirements
Please know that the generating or updating of a single comparison set will require between 2 and 6 API requests. If you are using the API Starter Plan, consider upgrading to the Basic Plan.
[IMPORTANT] Before You Begin
This plugin requires that you have installed and activated the Datafeedr API plugin. The following instructions will assume that you have installed the Datafeedr API plugin and selected your affiliate networks and merchants. Installation and configuration instructions can be found here.
Please know that the generating or updating of a single comparison set will require between 2 and 6 API requests. If you are using the API Starter Plan, consider upgrading to the Basic Plan.
datafeedr-comparison-sets
folder to the /wp-content/plugins/
directory.If you want Amazon products to appear in your comparison sets, do the following:
86400
.To display comparison sets for products in your WooCommerce store, follow these instructions.
Now, when a product in your store is viewed for the first time, a price comparison set will be generated.
Note: Enabling WooCommerce integration will not generate price comparison sets for all products in your store immediately. Sets will only be generated when the product is viewed for the first time.
To display comparison sets in your posts, pages or in other areas where WordPress shortcodes are allowed, use the formats below.
Create a price comparison set using name field:
[dfrcs name="baratza encore"]
Create a price comparison set using name and brand field:
[dfrcs name="j8006" brand="omega" ]
Create a price comparison set with a custom title:
[dfrcs name="chaos harness" brand="black diamond" title="{num_products} great deals on Black Diamond Chaos Harnesses"]
Available Filters
You can further filter the results of a Comparison Set by using the filters
attribute. Available filters are:
currency amazon_locale image onsale direct_url saleprice_min saleprice_max finalprice_min finalprice_max merchant_id source_id
Here is what each filter controls:
// Return only products which are priced in USD. currency=USD // Return Amazon products from US Locale. amazon_locale=US // Return only products that have an image. image=1 // Return only products that are on sale. onsale=1 // Return only products that have a direct URL. direct_url=1 // Return only products with a minimum sale price of $10. saleprice_min=10 // Return only products with a maximum sale price of $100. saleprice_max=100 // Return only products with a minimum final price of $20. finalprice_min=20 // Return only products with a maximum final price of $200. finalprice_max=200 // Return only products from merchants with specific Merchant IDs (merchant_id). merchant_id=61316,33092,97391 // Return only products from networks with specific Network IDs (source_id). source_id=126,3
Merchant IDs merchant_id
(MID) and Network IDs source_id
(NID) can be referenced on our Affiliate Networks & Merchants page.
Here are some examples of how to use these filters in your shortcodes:
Create a price comparison set using onsale
filter:
[dfrcs name="farpoint 55" brand="osprey" filters="onsale=1"]
Create a price comparison set using currency filter:
[dfrcs name="aeropress coffee maker" brand="aerobie" filters="currency=USD"]
Create a price comparison set using multiple filters:
[dfrcs name="nomad 20 solar panel" filters="currency=USD&finalprice_max=400"]
Create a price comparison set using an EAN code:
[dfrcs ean="737416080066"]
Create a price comparison set using an Amazon ASIN code:
[dfrcs asin="B07BN6KH6W"]
Create a price comparison set using an UPC code:
[dfrcs upc="050946872827"]
Create a price comparison set limited to specific merchants and networks:
[dfrcs brand="patagonia" name="hoodie" filters="merchant_id=61316,33092,97391&source_id=126"]
Shortcode to use on WooCommerce single product pages (ie. in blocks, page builders, widgets, etc…)
[dfrcs_wc]
Feel free to contact us here.
signed
encoded source values.dfrcs_wc
shortcode to return
instead of echo
to resolve issues with builders like Elementor.merchant_id
and source_id
filters to be used in shortcodes.require_once
statements.DFRCS_PLUGIN_FILE
constant.WC tested up to
to 6.3.register_activation_hook
register_activation_hook
to ensure that plugin can only be activated at Site-Level, not Network-LevelDFRAPI_DOMAIN
with 'datafeedr-comparison-sets'
.&
in filters
param in shortcode was being converted to &
causing the filters param to break.dfrcs_compsets
database table.dfrapi_get_price()
function to render pricing.add_filter( 'dfrcs_last_updated_text', function($text, $compset){return 'UPDATED:';}, 10, 2 );
asin
as a default barcode field.[dfrcs_wc]
shortcode to use on WooCommerce single product pages.dfrcs_sort_products()
to pass variable, not array, to array_multisort()
.Datafeedr_Plugin_Dependency
class.dfrapi_url()
function instead of returning the raw link from Amazon. (#15201)$product['suid']
in the query_amazon()
method. (#15084)dfrcs_can_manage_compset()
function.dfrcs_visitor_is_bot()
function.$product
properties to calls to public methods such as get_id()
and get_title()
. This is in preparation for WooCommerce 2.7.intval()
with sanitize_text_field()
on the source ID because 32 bit systems were converting long IDs to 2147483647. More info http://stackoverflow.com/a/25910134.asin
and isbn
to be passed along as shortcode attributes for Amazon searches.https://images.datafeedr.com/m/nnn.jpg
. (#12900)