XPATH PRICE SELECTOR

Closed
REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme REHub - Price Comparison, Affiliate Marketing, Multi Vendor Store, Community Theme May 06, 2020
Login to reply
Ahmed sleiman
3 years ago

I've used


.//*[@itemprop='price']/@content


and it's working.


thank you

Igor Sunz Support Agent
3 years ago

you added all 3 variants of xpath in one line. You must test all 3 xpath via path extension in browser and find XPath which is correct. How to test extension in browser and examples of such extensions can be found in documentation of Offer module on Keywordrush site

https://ce-docs.keywordrush.com/modules/affiliate/offermodule

Ahmed sleiman
3 years ago

dear I've attached a screenshot.

I've inputed an initial price and each offer has an xpath showing an error

Igor Sunz Support Agent
3 years ago

they are worked. Please, note, that Xpath is working on price update. Initial price must be added manually

Ahmed sleiman
3 years ago

Dear Sizam,

I changed the currency both in Theme Settings and offer Settings (product
level) + I have also used the suggested xpath.

none of them worked

best regards,

Igor Sunz Support Agent
3 years ago

because you didn't set correct currency in offer. Also, you are parsing price, but this site has meta schema which you should use

Try one of next

.//*[@itemtype='http://schema.org/Offer']//span[@itemprop='price']

.//*[@itemtype='http://schema.org/Offer']/span[@itemprop='price']

.//*[@itemtype='http://schema.org/Offer']/meta[@itemprop='price']/@content

Ahmed sleiman
3 years ago

Dear,


I've used the 'Xpath to get the price' function, the issue I'm facing is that the price is coming in thousands instead of the original price.

for example if the price was 250.9, it will be extracted as 250,900.00

how can I solve this issue

_______________________________

xpath = //div/span[@class='you-pay-price no-discount ' and 1]%DELIMITER%//div/span[@class='you-pay-price ' and 1]

link = https://www.xcite.com/huawei-p30-pro-512gb-phone-amber-sunrise.html


regards,