Product Price. Parsing
The price is parsed according to the same rules as the name, SKU, description, manufacturer... everything that is plain text.
For example, in the page code, the product price is between the parameters content=" and "
In order for the plugin not to confuse the text content="199.00" with the text content="PLN", you need to specify the parsing start parameter itemprop="price":
Price parsing is different from title or description parsing
Since the price is a number, the plugin removes all characters from the parsed fragment that are not numbers. For example, the price 199.00 could be parsed with these parameters: itemprop="price",data
All characters except 190.00 will be removed from the resulting fragment content="199.00".
This plugin feature allows you to parse complicated text fragments. For example, in this text, there are two prices (regular price and special price). We need to parse the special one, if it exists, else the regular one:
Parsing parameters should be set as follows: <prices>,</prices>,2
the last 2 mean that we need the second number from the parsed fragment.
If there is no second number, the plugin will take the first one.
<msrp style="30 px">510</msrp>
Here the regular price is the second number and the special one is the third:
- you can parse the special price this way: <prices>,</prices>,3
- the regular price: <prices>,</prices>,2
You can parse the special price with these parameters as well: <prices>,</prices>,5