From cab914bb64778d9ffb1a27e96e3a69993e9c4506 Mon Sep 17 00:00:00 2001 From: badsuricate Date: Fri, 18 Oct 2013 10:55:47 +0200 Subject: [PATCH] Add button "add product to cart" --- .../default/includes/single-product.html | 182 ++++++++++++------ 1 file changed, 125 insertions(+), 57 deletions(-) diff --git a/templates/default/includes/single-product.html b/templates/default/includes/single-product.html index bca37f80b..bade42365 100644 --- a/templates/default/includes/single-product.html +++ b/templates/default/includes/single-product.html @@ -1,65 +1,133 @@
  • -
    - - {loop name="brand.feature" type="feature" product=$ID title="brand"} - {loop name="brand.value" type="feature_value" feature=$ID product=$product_id} - - {/loop} - {/loop} - {loop name="brand.feature" type="feature" product=$ID title="isbn"} - {loop name="brand.value" type="feature_value" feature=$ID product=$product_id} - - {/loop} - {/loop} - -
    -
    -

    {$TITLE}

    - {if $hasDescription} -
    -

    {$DESCRIPTION}

    -
    - {/if} -
    + -
    -
    - - - - - - {if $IS_PROMO } - {loop name="productSaleElements_promo" type="product_sale_elements" product=$ID limit="1" order="min_price"} - {assign var="default_product_sale_elements" value=$ID} - {intl l="Special Price:"} {format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"} - {intl l="Regular Price:"} {format_number number=$TAXED_PRICE} {currency attr="symbol"} - {/loop} - {else} - {format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"} +
    +

    {$TITLE}

    + {if $hasDescription} +
    +

    {$DESCRIPTION}

    +
    {/if} +
    + +
    +
    + + + + + + {if $IS_PROMO } + {loop name="productSaleElements_promo" type="product_sale_elements" product=$ID limit="1" order="min_price"} + {assign var="default_product_sale_elements" value=$ID} + {intl l="Special Price:"} {format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"} + {intl l="Regular Price:"} {format_number number=$TAXED_PRICE} {currency attr="symbol"} + {/loop} + {else} + {format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"} + {/if} + +
    + + {form name="thelia.cart.add" } +
    + {form_hidden_fields form=$form} + + + + {if $form_error}
    {$form_error_message}
    {/if} + + {form_field form=$form field='product_sale_elements_id'} + {if $default_product_sale_elements } + + {else} + {loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"} + + {/loop} + {/if} + {/form_field} + {form_field form=$form field="product"} + + {/form_field} + +
    + {ifloop rel="stock"} +
    + +
    + +
    +
    + {/ifloop} +
    +
    + {form_field form=$form field='quantity'} +
    + + + {if $error } + {$message} + {elseif $value != "" && !$error} + + {/if} +
    + {/form_field} + +
    + +
    +
    +
    + {if $hasSubmit == true} + + {else} + {intl l="View product"} + {/if} + +
    +
    + +
    +
    + {/form}
    - {if $hasBtn} -
    - -
    - {/if} -
    -
    +
  • \ No newline at end of file