WordPress.org

Ready to get started?Download WordPress

Forums

Amazon Link
Adding Price to Template (4 posts)

  1. dave2511
    Member
    Posted 4 months ago #

    Sorry, completely new to this plugin and maybe I am being stupid.

    How do you know what the shortcodes are?

    Hopefully someone can help with my specific problem - I would like to add the current product US Amazon price above the add to cart button.

    Here is the code for the add to cart template, I only use US Amazon affiliate links so how to I add the price above it?

    <form method="GET" action="http://www.amazon.%TLD%/gp/aws/cart/add.html">
    <input type="hidden" name="AssociateTag" value="%TAG%"/>
    <input type="hidden" name="SubscriptionId" value="%PUB_KEY%"/>
    <input type="hidden" name="ASIN.1" value="%ASIN%"/>
    <input type="hidden" name="Quantity.1" value="1"/>
    <input type="image" name="add" value="Buy from Amazon.%TLD%" border="0" alt="Buy from Amazon.%TLD%" src="%BUY_BUTTON%">
    </form>

    Hope someone can help and Thanks!!

    https://wordpress.org/plugins/amazon-link/

  2. paulstuttard
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    Simply add the keyword %PRICE% to the top of the template, format it however you want. e.g.

    <div>
    %PRICE%</br>
    <form method="GET" action="http://www.amazon.%TLD%/gp/aws/cart/add.html">
    <input type="hidden" name="AssociateTag" value="%TAG%"/>
    <input type="hidden" name="SubscriptionId" value="%PUB_KEY%"/>
    <input type="hidden" name="ASIN.1" value="%ASIN%"/>
    <input type="hidden" name="Quantity.1" value="1"/>
    <input type="image" name="add" value="Buy from Amazon.%TLD%" border="0" alt="Buy from Amazon.%TLD%" src="%BUY_BUTTON%">
    </form>
    </div>

    If you use the Add Amazon Link helper on the post/page edit screen, this will help you create shortcodes.

    Note to get the price automatically from Amazon you will need to have registered with the Amazon Advertising API to get your AWS keys to put into the plugin settings.

    Alternatively you can also specify the price in a shortcode, e.g.:

    [amazon asin=0123456789&template=add to cart&price=$99.99]

    Hope that helps,

    Paul

  3. dave2511
    Member
    Posted 4 months ago #

    Thanks for the super quick reply!

    I had already tried that, and tried again after you said that was the way to do it. I just get a small dash above the add to cart button with template.

    I have only just registered with the AWS today maybe that is the problem? I have both my keys added in the settings. Can it take 24 hours before these keys work?

  4. paulstuttard
    Member
    Plugin Author

    Posted 4 months ago #

    Hi,

    The keys usually work straight away, but sometimes Amazon don't enrol you into the Advertising API program automatically.

    Go to your AWS account and check what programmes you are enrolled on to.

    Cheers,

    Paul

Reply

You must log in to post.

About this Plugin

About this Topic