Check if hasbtn is true to display the button "add to cart "

This commit is contained in:
badsuricate
2013-10-23 15:45:00 +02:00
parent b8c433f92c
commit dffb5375f5

View File

@@ -56,9 +56,9 @@
{/if} {/if}
</div> </div>
{if $hasBtn == true}
{form name="thelia.cart.add" } {form name="thelia.cart.add" }
<form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form"> <form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form" class="form-product">
{form_hidden_fields form=$form} {form_hidden_fields form=$form}
<input type="hidden" name="view" value="product"> <input type="hidden" name="view" value="product">
<input type="hidden" name="product_id" value="{$ID}"> <input type="hidden" name="product_id" value="{$ID}">
@@ -115,20 +115,20 @@
</div> </div>
<div> <div>
<div class="product-btn"> <div class="product-btn">
{if $hasBtn == true}
{if $hasSubmit == true} {if $hasSubmit == true}
<button type="submit" class="btn btn-cart">{intl l="Add to cart"}</button> <button type="submit" class="btn btn-cart">{intl l="Add to cart"}</button>
{else} {else}
<a href="{$URL}" class="btn btn-cart">{intl l="View product"}</a> <a href="{$URL}" class="btn btn-cart">{intl l="View product"}</a>
{/if} {/if}
{/if}
</div> </div>
</div> </div>
</fieldset> </fieldset>
</form> </form>
{/form} {/form}
{/if}
</div> </div>
</article><!-- /product --> </article><!-- /product -->
</li> </li>