• Hi Timo,

    How can I show a product’s Amazon price by clicking on a button? For example with jQuery:
    $(“#button”).on(“click”, function(){….}); and I don’t know what put in the function for calling the ASA request.

    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Timo

    (@worschtebrot)

    You could put the price in a data attribute, like

    <a id="button" data-price="{$AmazonPrice}">Text</a>

    and then grab that price via jQuery, like

    $("#button").on("click", function() {
      var price = $(this).data('price');
      ...
    });

    I did not test the jQuery code, but it should be something like that … ??

    • This reply was modified 8 years ago by Timo.
    Thread Starter JuanjoChin

    (@juanjochin)

    Ok I think I understand you. But in your case you have previusly stored the price in a data attribute when loaded the page. However, I have a list of products in a pull-down menu, and what I want is by selecting one of them and clicking on the button, the ASA request is sent. So depending on the selected product, an ASIN code will be taken, perfect, but I don’t know how to launch the request via [asa..]ASIN[/asa] in the function of the button…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display request on click event’ is closed to new replies.