Not sure how to set this plugin up tried, but not working as expected no idea where to start
What have you tried so far?
At it’s most basic, you should be able to create a comparison table on any page by adding this shortcode:
[pricecomparisonpro urls="https://www.amazon.co.uk/Blue-Yeti-USB-Microphone-Silver/dp/B002VA464S" displaystyle="panel"]
With the above, you can list multiple URLs separated by commas, and if you want to get paid you can add the affiliateurls parameter and list the affiliate URLs per each product.
If you’re integrating into WooCommerce then you need to add the external and affiliate URLs to each product – either manually or using your import job.
Hi hi I’ve tried what you said and all I get is the pound symbol the price is not displaying. Is there any way you can check just see if I have configured the plug-in properly for it to work.
I logged in, I saw this in your CSS: https://i.imgur.com/OZB9inK.png
The CSS selector should just be what I said, the # at the beginning means CSS ID whereas the . at the beginning would correctly identify the element based on the CSS class.
The example you sent me, it looks like it’s correctly grabbing the price but that’s from ao.com rather than currys – do you have the currys example you said wasn’t working?
Ok – here’s the answer for your curry’s example.
I can see straight away that Currys has some anti-scraping CSS in place. See this image:
I had a look at the source code for the page, and at least Currys are nice enough to leave a meta value containing the price. See this article for a guide to scraping those kinds of prices:
In this case with Currys there are 2 meta values we could grab the price from:
So using this XPATH Selector (Note: You need to choose the dropdown to switch this site from CSS to xPath for this to work in pcpro settings) you’ll be able to grab the price:
Alternatively, curry’s are changing the HTML on page load, if you view source you’ll see better CSS classes you can use. I found this for regular price for currys:
#product-actions .prd-past-amounts span[data-key=”was-price”], #product-actions .prd-amounts .current
(note there are 2 selectors in there since the regular price will change CSS selectors if there is a sale happening)
and then for sale price you can just use:
#product-actions .prd-amounts .current