Datafeedr Price Comparison Shortcodes

To display comparison sets in your posts, pages or in other areas where WordPress shortcodes are allowed, use the [dfrcs] formats below.

1

Available Shortcode Fields

Here are the available fields you can use in the shortcode:
name
brand
title
ean
upc
isbn
asin
gtin
context
filters

Examples

  • 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 using an Amazon ASIN code:

[dfrcs asin="B07BN6KH6W"]

  • 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"]

Pro Tip!

These are the available placeholders you can use in the title field: 

  • {product_name} 
  • {lowest_price} 
  • {highest_price} 
  • {num_products} 
  • {num_merchants}
2

Available Filters

You can further filter the results of a Comparison Set by using the filters field. Here are the available filters you can use:
currency
amazon_locale
image
onsale 
direct_url
saleprice_min
saleprice_max
finalprice_min
finalprice_max
merchant_id
source_id

Examples

  • 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 limited to specific merchants and networks:

[dfrcs brand="patagonia" ean="737416080066" filters="merchant_id=61316,33092,97391&source_id=126"]

Pro Tip!

Merchant IDs merchant_id (MID) and Network IDs source_id (NID) can be referenced here.

3

Using Different Comparison Templates

You can create different Comparison Set templates and refer to a specific template name via the context field like this:

[dfrcs name="patagonia hoodie" context="template1"]

The Comparison Set will look for the template1.php file here:

/wp-content/themes/YOUR_THEME/dfrcs-templates/template1.php

Pro Tip!

It's strongly recommended to create a Child Theme otherwise one theme upgrade will remove all of your custom templates.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us