Mi solución para 1.7 a mi manera es la siguiente:
<form action = "{$ urls.pages.cart}" method = "post" id = "add-to-cart-or-refresh">
<input type = "hidden" name = "token" value = "{$ static_token} ">
<input type =" hidden "name =" id_product "value =" {$ product.id} "id =" product_page_product_id ">
<input type =" hidden "name =" id_customization "value =" {$ product .id_customization} "id =" product_customization_id ">
{if $ product.quantity <1}
<button class =" btn btn-danger add-to-cart "data-button-action =" add-to-cart "type =" enviar ">
<i class =" material-icons ">error_outline </i>
{ls = 'Agotado' d = 'Shop.Theme.Actions'}
</button>
{else}
<button class = "btn btn-primary add-to-cart" data-button-action = "add-to-cart" type = "enviar">
<i class = "material-icons shopping-cart"> & # xE547 ; </i>
{ls = 'Añadir' d = 'Shop.Theme.Actions'}
</button>
{/ if}
</button>
</form>
De esta manera obtendremos el resultado que esperaba, muestra 'Añadir' en el caso de que haya stock y 'Agotado' en el caso de que no quede stock.
Espero que os sirva de ayuda. Podéis ver el resultado en http://www.mundoraspberry.com