Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Price Comparison Script 1

Status
Not open for further replies.

doorbreaker

Programmer
Nov 19, 2002
91
GB
Hi,

I have tried looking around but haven't really found anything.

I am looking to get a price comparison system up and running on a shopping cart and wondered if anybody knew of any scripts or code available as a starting point...

Thanks

Chris Moore
 
More important than the script is probably your database behind the script.

If it doesn't have good groupings of comparable products then you'd need to start by doing that.

Its one thing to compare apples to oranges but quite another to compare apples to automatic transmissions.
 
All products are categorised.

I just wondered if anyone knew a good way of getting the latest prices of products off other websites?

Ta

Chris
 
Better to work directly with the other sites and get their data in some sort of exchange or feed... like an xml file or delimmitted or fixed length... you know, normal data exchange stuff.
 
The only problem is that we want to show we are cheaper than the other sites. I can't see them agreeing to it.

Does anyone else do this?
 
i think you can use ServerXML to grab prices from various websites...

-DNG
 
You'll prolly have to parse the other site's data and a simple change to their page layout could mean a major overhaul in your parsing script.

If the other site doesn't agree to share data then you may find it best to use an actual person to accomplish this task... or at least to key the other business's prices into your own database table.
 
ServerXMLHTTP seems to be the answer for stripping stuff out and I can see how that works no probs.

This site has a good example of it in action:
The tricky bit is going to be how to match the products in our db with those on other websites....

...I think this may be possible by using the post method on a search page and then to try and display the results. If anyone knows if this will be successful or of any other method feel free to share.
 
thanks with this - i have found a way of doing this indeed using a post on the search string - if a product that a user is looking at matches the name of a product on another site then the price difference is displayed.

 

doorbreaker,

Just a quick word of warning.. and to re-enforce Sheco's statement - page scraping an uncontrolled site is a risky design - a very minor change to the site you are trying to scrape could result in errors in your script. If you intend to compare multiple sites this could become a 'mare to support.

Suggest you consider other alternatives first - have you asked these sites if you they could provide a data feed of some kind? Depends on its use but some may be happy to do so if it means more publicity.



A smile is worth a thousand kind words. So smile, it's easy! :)
 
Thanks, I understand the risks and will look into alternatives. At the moment I am just doing a bit of research so this is in no way ready for roll out at all.

(BTW - I am smiling [bigears])
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top