1 replies
Hi

New to programming and trying to figure out how to write html code for a link on my wordpress website that shows just the price to an amazon product (not the title etc). I have a comparison table and wanted to list just the price link in the table.

If you could give an example that would be very helpful. Thanks so much for your help.
#amazon #link #price
  • Profile picture of the author RemingtonSteele
    I'm assuming that you'd like to show the current price, as opposed to a static, hard-coded price. If that's the case, then you'll need to go spelunking in the Amazon Product Advertising API documentation to see what data you need to request and how you should request it. I don't do much with PHP (upon which Wordpress is based), so I can't really help you with the code that you need to add to your site. Having said that, here's the general idea of how to do it:

    1) Get the ASINs for the products that you're comparing.
    2) Use the ASINs to get the price data, which you'll need to extract from the XML response from the API.
    3) Programmatically display the price data in your post/page template. You probably need to create one or more PHP functions to handle the API calls and the rendering of the HTML.

    If that's too much work for you, then there's always phpZon, a Wordpress plugin that retrieves Amazon data. You may be able to tweak the settings to get just the prices (and product detail page URLs) for a given list of ASINs.
    {{ DiscussionBoard.errors[4780835].message }}

Trending Topics