I am having an issue that I haven’t been able to pin down the culprit for. I am using Hop Studios Amazon plugin for a small “store” and the problem is that even products designated as UK products are coming out linked to Amazon.com. I think I have ruled out the plugin as a source of error, which leaves my if-statements or possibly some change in the API.
The code below is what I am using. It checks to see if the 39_amazon_locale field is set to US or not. If it is, it fills out the appropriate region for the plugin. If not, it sets up the region for co.uk instead.
Is the problem in my conditionals? I tried skipping the if:else and just doing one test for US and one for UK and that didn’t work either.
<ul>
{exp:weblog:entries weblog="weblog39" limit="10" orderby="date" category="249"}
<li>
<div class="StoreIndexItem">
{if 39_amazon_locale == "us"}
{exp:aws_products:search item_id="{39_amazon_asin}" region="com" associate_id="{39_amazon_id}" public_key="XXX" private_key="XXX"}
{if:else}
{exp:aws_products:search item_id="{39_amazon_asin}" region="co.uk" associate_id="{39_amazon_id}" public_key="XXX" private_key="XXX"}
{/if}
<div class="StoreIndexImage"><a href="http://{amazon_link}">{img_medium}</a></div>
<div class="StoreIndexText">
{title}
{39_seller}
</div>
</div>
{/exp:aws_products:search}
</li>
{/exp:weblog:entries}
</ul>