Viewing 2 replies - 1 through 2 (of 2 total)
  • Don Fischer

    (@prophecy2040)

    Hi Jürgen,
    You need use the amazon-elements shortcode to get the reviews. Amazon will only provide them as an iframe via the API, so we have to output them that way and the shortcode is the only way to get custom fields from the API.

    You can use it like this (where the ASIN is your ASIN you are using):
    [amazon-elements asin="XXXXXXXXXX" fields="customerreviews"]

    if you want to label the area, include the label like so:
    [amazon-elements asin="XXXXXXXXXX" fields="customerreviews" labels="Customer Reviews:"]

    If you were using it in a theme template in the loop code for a post that is using the metabox option (not a shortcode), and you just need the URL for the iframe, do it ‘something’ like this (depending on your needs):

    <?php
    $asin_on = get_post_meta( $post->ID, 'amazon-product-isactive', true );
    $asin    = get_post_meta( $post->ID, 'amazon-product-single-asin', true );
    // if the product is active and is a single ASIN, output.
    if( $asin_on == '1' && $asin != '' && strpos( $asin, ',' ) === false ){
        echo '<iframe src="'.do_shortcode('[amazon-elements asin="'.$asin.'" fields="customerreviews_clean"]').'" />';
    }
    ?>

    Hope this helps!
    Warm regards,
    Don

    Thread Starter angelus0709

    (@angelus0709)

    Very good thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Amazon reviews’ is closed to new replies.