Price Comparison Pro Support

Below you can find instructions on how to install and configure the Price Comparison Pro Plugin.

Installation instructions for the Price Comparison Pro Plugin:

After purchasing the Price Comparison Pro, you will receive a zipped file, from there, please follow these steps:

In your WP admin area, click on “Plugins” -> Add new -> Upload Plugin -> Choose file. From there you can select the zipped file you selected and install the Plugin.

addnew

The Price Comparison Pro Plugin uses shortcodes, there are two ways to make it work for a particular page.

Shortcodes

You can use a shortcode on a page, the shortcode style is – [pricecomparisonpro urls=”url1,url2,url3, etc” affiliateurls=”affurl1, affurl2, affurl3, etc”], simply replace url1, url2, url3 with the urls of the pages from which you want to scrape a price.

shortcode

WooCommerce

Edit your product using WooCommerce and on the General tab you will find a button to add a Price Comparison URL pair. You may add up to ten of these.

There are two urls that appear. The first is the direct URL of the page which contains the price. The second is where you can place your money-making affiliate URL. If you leave this second box empty, Price Comparison Pro will attempt to monetize using Skimlinks. If you have no Skimlinks account set up, it will revert to using the direct, unmonetized link.

Website Configuration

In order to scrape prices, you need to tell Price Comparison Pro where they are located. We currently use CSS selectors to handle this.

This per-website approach means you don’t need to reconfigure the selector per product – configure once per website and then you it will scrape all URLs you enter in your product pages (or shortcodes) using the relevant CSS selector for your site.

In “Settings” of WP-admin, click on “WordPress Price Comparison”. Scroll down to “Website configuration”, here you will see three types of boxes.

columns

The boxes are: domain, logo url and CSS selector.

Domain: Enter the url of the website from which you wish to scrape. Do not use the “Http” there, only the clean URL – (e.g. www.ebay.co.uk)
Logo URL: Enter the URL of a logo for this merchnat. The logo will appear to the left of the price in the price comparison box.
CSS Selector: Enter the CSS selector that selects the price from the website. There is a video below explaining the easiest way to obtain these.

CSS Selectors

We use CSS selectors to find the prices on the page. The video below explains the easiest way to find these.

CSS is normally used to style elements on the page – in Chrome, if you right-click the price a context-menu comes up.

Choose ‘inspect element’

On the left hand side window that appears will be the HTML containing the price.

On the right hand side window are all the CSS selectors that apply to this price.

Choose the CSS selector that seems to be most selective and paste it into your CSS Selector box (third box) for this website (on the price comparison pro -> settings page)

If you get stuck we have a paid service to configure these for you. Configuring the CSS selectors is a one-off job per website. Once they are configured, you just need to get the URLs into your product page.

Setting up your first product

There are two ways to set up the Price Comparison Pro plugin.

You can either do it through WooCommerce or you can add a shortcode to a page

WooCommerce

Edit your product using WooCommerce and on the General tab you will find a button to add a Price Comparison URL.

You may add up to 10 of these. There are 2 urls that appear. The first is the direct URL of the page which contains the price. The 2nd is where you can place your money-making affiliate URL. If you leave this 2nd box empty, Price Comparison Pro will attempt to monetize using Skimlinks. If you have no Skimlinks account set up, it will revert to using the direct, unmonetized link.

Shortcode

You can use the following style of shortcode to add Price Comparison anywhere – i.e. not just in WooCommerce:

[pricecomparisonpro urls="url1,url2,url3, etc" affiliateurls="affurl1, affurl2, affurl3, etc"]

Now when you view your product, price comparison will kick in and each link will be monetized.

Automating Insertion of the Price Comparison Pro URLs

You can either manually enter the relevant URLs for each product or you can automate this process. If you have a large number of products, it makes sense to automate it.

The means of automating varies depending on how you are sourcing your products – ultimately, you need to enter the Price Comparison Pro URLs into the following product meta data:

  • producturl1, producturl2 etc (up to 10)
  • pcproaffiliateurl1, pcproaffiliateurl2 etc (up to 10)

PHP Code to set these URLs

Here are the internals of a function that you can use (you don’t need to define this function, it comes with Price Comparison Pro):


function setPriceComparisonProURLs($post_id, $comparisonindex, $directurl, $affiliateurl) {
update_post_meta( $post_id, 'producturl' . $comparisonindex, esc_attr( $directurl ) );
update_post_meta( $post_id, 'pcproaffiliateurl' . $comparisonindex, esc_attr( $affiliateurl ) );
}

That means you can call this function above with the post_id, the index (starts at 1, up to 10), the direct product url and the affiliate url inside your import job.

If you need help with this, let us know. We want to ideally automate this as far as possible for people – perhaps by de-duplicating existing products in your site based on the SKU. Before I code that up, I’d like to know what other techniques people are using and what would work best.

Troubleshooting

The main complaint people have is that prices are not updating. If this is happening to you:

  1. Check you have the correct domain entry and correct CSS selector on the settings page
  2. If that fails, please click the ‘CHECK’ button on the prices to force a live update and view the Javascript console (CTRL+SHIFT+I on PC Chrome, CMD + OPT + I on Mac Chrome)
  3. If the console tells you ‘scraper not found’ it means you either don’t have an entry in the settings page, or you have entered the domain incorrectly. Domains should not include http:// at the beginning.
  4. If the console tells you ‘found: undefined’ after you click ‘check’ below the prices – this means either your CSS selector is not working, or the prices are not available on the page through normal means and you need to use our Scraping Service instead which uses PhantomJS to mimic a browser.
  5. Sometimes if no prices are returned at all it can be down to the server configuration. Check your PHP config on your server for the option ‘allow_url_fopen’. If this option is set to ‘Off’ then you must change it to have the value ‘On’ and then restart your chosen webserver for it to take effect. Check again with phpinfo(); that the value has changed and then try reload your product pages.

If you are struggling with CSS selectors, check our video above.

Anything not covered above?

We have a stackoverflow-style Q&A section specifically for Price Comparison Pro.

Price Comparison Pro Q&A

If you have any questions, use the link below. We’re also normally available on hullo chat most days.

Ask a Question
  • Hullo and welcome! Chat directly to the site owners below.
Latest Message: