To scrape prices on websites, you first need to configure the settings by going to Dashboard > Price Comparison Pro > Price Comparison.
Price Comparison Pro Tool
Once you have decided which websites you want to scrape, you need to add them to the Price Comparison Pro Tool.
- Domain: Add the website you want to scrape here. Make sure it’s a clean URL (no https://. just e.g www.website.com)
- Logo URL: If you want to display a logo in the panel on your page. These can be remote URLs or local from your Media Library.
- Currency Symbol: Add the currency of the website you are scraping.
- Currency position: Select whether you want the currency symbol to display before or after the price.
- Decimal Symbol: Be sure this decimal symbol matches the symbol on the site being scraped. Either a point ( . ) or a comma ( , ).
- Expression Type:
- Scrape Type:
- Price Selectors: Here you add the CSS selectors for the regular price of the product you are scraping.
- Sales Price Selectors: Add the CSS selectors for the sale price of the scraped product.
- Image Selectors:
- Rescrape: Rescrape the website.
For information about configuring CSS selectors, visit this article:
Adding with WooCommerce
Choose which product you want to scrape for and edit the product, either through Dashboard > Products > All Products or by selecting “Edit Product” on your product page. Scroll down to “General” settings.
Add your regular URLs on the left and Affiliate URLs on the right.
There are seven different usable locations for Adding with WooCommerce.
Here is a practical guide for where these locations will display on your page:
And here is an example of “woocommerce_before_add_to_cart_form” enabled:
Adding with shortcodes
Adding Price Comparison Pro with shortcodes enables you to add it wherever on the page you want. Select your preferred area and add our shortcode:
[pricecomparisonpro urls="SCRAPING-WEBSITE-URL-HERE" affiliateurls="SCRAPING-WEBSITE-URL-HERE"]
Update WooCommerce Prices/Images