1

Having an issue w/ this EE add-on where if an Amazon product isn't found with a specific ID I get this error:

You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.

Parser State: Unexpected end of Template “article/index” on line 157; expected ENDIF tag for opening on line 46 in Template “layouts/.html-layout”.

Here's how I'm using the tags in my template:

{if amazon_product_asin_or_isbn}
<div class="panel PanelProduct clearfix">
  {exp:aws_products:search
    item_id="{amazon_product_asin_or_isbn}"
    associate_id="{associate_id}"
    public_key="{public_key}" private_key="{private_key}"
  }
  <div class="PanelProduct-imageContainer left">
    <img src="{img_large}" alt="">
  </div>
  <div class="PanelProduct-content right">
    <h3 class="Article-subheading">Related Product:</h3>
    <h4 class="PanelProduct-heading">{product_name}</h4>
    <div class="PanelProduct-info">{catalog_type} | {publisher}</div>
    <a class="button small u-mediumTopMargin u-noMarginBot" href="{amazon_link}" target="_blank">{best_price} on Amazon</a>
  </div>
  {/exp:aws_products:search}
</div>
{/if}

I then tried using this if statement within the tags to only render the product panel if there is a product found:

{if aws_count > 0}   {/if}

But then I get this error in the template:

Severity: Notice

Message: Undefined index: !-- ra:000000003bf7ea8400000001087a7b32 --

Filename: aws_products/pi.aws_products.php

Line Number: 237

It seems like any if statements within the tags break the plugin. So how can I integrate the tags in a way that detects if there's a valid product ID filled in without totally breaking the page?

Using AWS Products 3.1.0 on EE 2.9.2

0

Louis at Hop Studios has posted an update of this plugin which fixes the above issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.