Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding links to e-commerece vendors on your website

Tags:

html

css

c#-4.0

I have made a book website for my final semester project and I wanted to add the following functionality to it :

I display information about a book, I want to add links to different vendors where the user can buy the books. For e.g. I could put links to amazon, ebay etc. Once the user clicks on it, he would be directed to that specific website but with the product page open on it.

Do I have to use a API for the same or I can just append stuff to the url and achieve the same effect?

Thank you in advance.

like image 560
user590849 Avatar asked Jan 29 '26 20:01

user590849


1 Answers

A lot of sites do have an url api, but often times require some sort of token you pass along to access their data. And it's pretty much a guarantee each site will be different in how they structure those urls. It also depends on what data you have to make that query. Author? Title? ISBN?

However, if you are just looking to have some quick results you can do a search on the site and analyze the url to figure out a general query to work with. For example I just went to look at Amazon and ebay:

For Amazon I did a search and realized the ISBN was in the string. So I created a few custom urls:
http://www.amazon.com/dp/0765325950/
http://www.amazon.com/dp/1449331815
http://www.amazon.com/dp/0441013597/

That isn't a cryptic number, but the ISBN-10 for those books. And here is a keyword search: http://www.amazon.com/s/?field-keywords=enders%20game
(the %20 is url encoding for a space)

Ebay is a bit different. Here are some queries:
Keyword: http://www.ebay.com/sch/i.html?_nkw=wheel+of+time
Keyword: http://www.ebay.com/sch/i.html?_nkw=the+hunt+for+red+october

Some other sites I tried:
Keyword: http://www.barnesandnoble.com/s/war+and+peace
ISBN-13: www.barnesandnoble.com/s/9781449331818
ISBN-10: http://www.barnesandnoble.com/s/0812550706
ISBN-13: http://www.booksamillion.com/p/9780618260300
ISBN-10: http://www.booksamillion.com/p/1476714789

So just replace the relevant part of the url: keywords, ISBN-10, ISBN-13, for any of those services and you should be good to go. Note that this is NOT a long term solution. You should really be using the services API's, but since this is just a school project. Good enough IMHO.

like image 192
mcanfield Avatar answered Feb 01 '26 13:02

mcanfield



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!