jquery-rss
jquery-rss copied to clipboard
Issue getting a price from RSS feed
--item-- --isc:price-- ---- --/isc:price-- --/item--
My feed has this tag for the price, and I need to show it as a token. When I try the following:
tokens: { price: function(entry, tokens) { return entry.isc:price } }
I get the following error: Uncaught SyntaxError: Unexpected token :
Am I doing something wrong?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Please provide the feed url
Sure thingL http://original.mybigcommerce.com/rss.php?action=featuredproducts&type=rss
This URL does not work at all for me. anyways: you could try entry['isc:price']
.
Sorry - the feed was updated.
http://store-hi7gs6.mybigcommerce.com/rss.php?action=featuredproducts&type=rss
entry['isc:price'] returns as undefined.
Apologies, but I'm having a similar problem here as I'm not quite sure how to use the custom tokens:
Feed: https://atsv7.wcn.co.uk/search_engine/rss.cgi?SID=cnNzX2NvZGU9MTQxJnJlcXNpZz0xNDQ3NDIwNjk5LTAwNjkwODc1NjQyMGU3YWJlMDI5OWIwNDE5MDdkYzQ1NTFiMjBkYjQ=
<item>
<title>Sales Executive - Newmarket</title>
<description>[jobtitle]Sales Executive - Newmarket[/jobtitle]
[vacancyref]1502738[/vacancyref]
</description>
...
</item>
How would I retrieve the data from inside the brackets? I've tried:
vacancyref: function(entry, tokens) { return entry['description:vacancyref'] }
Which returns:
'undefined'
and I've tried:
vacancyref: function(entry, tokens) { return tokens.description.vacancyref }
Which gives the console error of:
'Uncaught TypeError: Cannot read property 'vacancyref' of undefined'
Sorry I'm being a n00b here, but hopefully any answers can help others too.