Coding For Online Success

Dynamic XML/RSS Feed using PopShops


Well, I noticed that I haven’t added any code examples in a while, so here is a new one I’m working on now. PopShops is a great tool to display products from different merchant networks like Commission Junction, LinkShare, ShareASale, etc. You can quickly create product pages and have them delivered using multiple methods. Methods include javascript, PHP, XML, etc.

I’ve been using the Pro account for a while on a single site. With my continuing efforts to become more diversified I’ve been focusing on more PopShop stores, so I upgraded my account to the Enterprise level. This is important if you want to have unlimited affiliate PIDs, etc. Currently the free or Pro option allows for one affiliate ID / merchant. So if you have many domains listed with CJ, you can only provide one PID to track. That’s a problem, and was an obvious choice to upgrade the account. If you upgrade you also get additional features like XML/RSS options for your store.

With this option you can easily create dynamic XML/RSS feeds. The example below is using XML, since I wanted price and image URLs to be parsed out of the content. RSS includes these directly in the ‘description’ and would require additional, non-needed parsing. My example is also using PHP5’s simplexml_load_string() function. You will need to make sure that PHP is compiled with simplexml support for this to work. If you’re using PHP4 you’ll most likely have to use domxml_open_mem() for this to work. I will not cover/support PHP4 in this post.

You will need to follow these instructions listed at PopShops (

What you will need:
1. A enterprise account

How you do it:
1. Go ahead and create your shop the normal way by searching and adding products.
2. Go to the ‘Pop it in’ tab.
3. Select the ‘RSS2’ or the ‘XML’ option in the code drop down.
4. Copy the link to the rss version of your shop, and paste it into the address bar of your favorite browser (FireFox). It should look something like this:…59d6dc61a73.rss
5. You should see an RSS/XML version of your shop.
6. Now just add ?psps_search=KEYWORDS obviously replacing KEYWORDS with whatever term you are searching on. You will now have a keyword driven RSS/XML feed. So for example:…earch=ipod+case

span class=”co1″>// set to zero for no timeout

"‘no records found’

Leave a Reply

Required fields are marked *.

CommentLuv badge

This site uses Akismet to reduce spam. Learn how your comment data is processed.