Created
April 30, 2018 20:10
-
-
Save candice-womp/e060dae7296db0ebdc7bc9648ac6ae83 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<amp-list layout="fill" src="https://mysite.com/productID.json" template="addToCart" items="." single-item> | |
<template type="amp-mustache" id="addToCart"> | |
<div class="productCard"> | |
<div class="productImg"> | |
<amp-img layout="responsive" height="16" width="9" src="{{Img}}"></amp-img> | |
</div> | |
<h2 class="productName">{{ProductName}}</h2> | |
<div class="productInfo"> | |
{{#InStock}} | |
<div class="productPrice">{{ProductPrice}}</div> | |
<div class="productSavings">{{ProductSavingPercentage}}</div> | |
{{/InStock}} | |
{{^InStock}} | |
<h4 class="productOutOfStock">Sorry. This item is out of stock.</h4> | |
{{/InStock}} | |
</div> | |
<div class="addToCart"> | |
{{#InStock}} | |
{{#HasBulk}} | |
<a href="#">Add 3 to Cart</a> | |
<a href="#">Add 6 to Cart</a> | |
<a href="#">Add 9 to Cart</a> | |
{{/HasBulk}} | |
{{^HasBulk}} | |
<a href="#">Add to Cart</a> | |
{{/HasBulk}} | |
{{/InStock}} | |
{{^InStock}} | |
<a href="#">Email Me When In Stock</a> | |
{{/InStock}} | |
</div> | |
</div> | |
</template> | |
</amp-list> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment