jquery-rss icon indicating copy to clipboard operation
jquery-rss copied to clipboard

Issue getting a price from RSS feed

Open daniellelecomte opened this issue 9 years ago • 5 comments

--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.

daniellelecomte avatar Mar 20 '15 02:03 daniellelecomte

Please provide the feed url

sdepold avatar Mar 21 '15 12:03 sdepold

Sure thingL http://original.mybigcommerce.com/rss.php?action=featuredproducts&type=rss

daniellelecomte avatar Mar 23 '15 23:03 daniellelecomte

This URL does not work at all for me. anyways: you could try entry['isc:price'].

sdepold avatar Mar 28 '15 19:03 sdepold

Sorry - the feed was updated.

http://store-hi7gs6.mybigcommerce.com/rss.php?action=featuredproducts&type=rss

entry['isc:price'] returns as undefined.

daniellelecomte avatar Mar 31 '15 02:03 daniellelecomte

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.

thathurtabit avatar Nov 16 '15 13:11 thathurtabit