I'm working on a site that has its own blog, so I was thinking what if I can pull the posts about that specific product that the customer viewing and present those to him/her.
So I'm working on it, half way through. It will have these features:
1. Let you set a list of blogs you want to pull articles from. This mod is written for WP, but it should work for most blogs which have a feeder.
2. Let you manually insert articles's links for any specific product.
Let me know if you are interested in any other features.
----------------------------------------------------------------------
Now come to the technical part, read on if you are familiar with PHP coding. I'll describe my approach in this particular mod, let me know if you have any suggestion:
I'm using SimplePie(http://simplepie.org/) for this particular mod, without it the job would me much harder for me.
What I do is: say my site is mysite.com, and I want to search for article about a product with the id 450, I will use SimplePie to parse content from this link:
I will get a list of posts that contain the link to that specific product on my site.Code:http://theblog.com/feed?s=mysite.com/index.php?main_page=product_info&products_id=450
Because a link to a product from a ZC site can vary sometimes (with or without the cPath, seo url,....), you can provide a list of possible "link formats" and the mod will know that it needs to try all those options. You can set defautl "link formats" for all blog or you can set a specific set for any blog you want.
One of the drawbacks right now is that: the feeder usually displays only the 10 latest posts, so it might miss some thing. The good point is: since we will run this on cronjob very often, we usually won't miss any.
And since getting content from another site can get very slow, you may have to run this process every few hours or so, the mod will keep track of all that, all you have to do is to make sure the cronjob works and the posts' links will be retrieved eventually, without slowing down your site.
yellow1912
Bookmarks