diff --git a/templates/frontOffice/default/assets/js/script.js b/templates/frontOffice/default/assets/js/script.js index 68e313061..ff2ddc2fb 100644 --- a/templates/frontOffice/default/assets/js/script.js +++ b/templates/frontOffice/default/assets/js/script.js @@ -296,13 +296,13 @@ $(".form-product").submit(function () { var url_action = $(this).attr("action"); var $cartContainer = $(".cart-container"); - + var product_id = "product_id=" + $("input[name$='product_id']",this).val(); + $.ajax({type: "POST", data: $(this).serialize(), url: url_action, success: function(data){ $cartContainer.html($(data).html()); - - $.ajax({url:"ajax/addCartMessage", + $.ajax({url:"ajax/addCartMessage", data:product_id, success: function (data) { bootbox.dialog({ message : data, diff --git a/templates/frontOffice/default/includes/addedToCart.html b/templates/frontOffice/default/includes/addedToCart.html index e90fc6029..6e83a2612 100644 --- a/templates/frontOffice/default/includes/addedToCart.html +++ b/templates/frontOffice/default/includes/addedToCart.html @@ -1,9 +1,9 @@ +{loop type="product" name="add_product_to_cart" id={product attr="id"}}
- {loop type="cart" name="cartloop" limit="1" order="reverse"} @@ -17,8 +17,8 @@
- {loop name="product_thumbnail" type="image" product=$PRODUCT_ID width="218" height="146" resize_mode="borders" limit="1"} + {loop name="product_thumbnail" type="image" product=$ID width="218" height="146" resize_mode="borders" limit="1"} Product #{$LOOP_COUNT} {/loop} {if $IS_PROMO == 1} - {assign "real_price" $PROMO_TAXED_PRICE} -
{$PROMO_TAXED_PRICE} {currency attr="symbol"}
+ {assign "real_price" $TAXED_PROMO_PRICE} +
{$TAXED_PROMO_PRICE} {currency attr="symbol"}
{$TAXED_PRICE} {currency attr="symbol"} {else} {assign "real_price" $TAXED_PRICE} @@ -28,25 +28,21 @@
- {/loop} - {intl l="View Cart"}
- -{ifloop rel="product_upsell"} - - {/ifloop} +{ifloop rel="accessories"} + +{/ifloop} +{/loop} diff --git a/templates/frontOffice/default/includes/single-product.html b/templates/frontOffice/default/includes/single-product.html index ff1edc590..3651195ea 100644 --- a/templates/frontOffice/default/includes/single-product.html +++ b/templates/frontOffice/default/includes/single-product.html @@ -1,69 +1,65 @@ -
  • - {assign var="hasSubmit" value = false} - {assign var="productTitle" value="{$TITLE}"} - -
    - - {loop name="brand.feature" type="feature" product=$ID title="brand"} +{assign var="hasSubmit" value = false} +
    +{if not $product_id} +{assign var="$product_id" value=$ID} +{/if} + + {loop name="brand.feature" type="feature" product=$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} + {loop name="brand.feature" type="feature" product=$product_id title="isbn"} {loop name="brand.value" type="feature_value" feature=$ID product=$product_id} {/loop} + {/loop} + + -
    -

    {$productTitle}

    - {if $hasDescription} +
    +

    {$TITLE}

    + {if $hasDescription}

    {$DESCRIPTION}

    + {/if} +
    + +
    +
    + + + + + {if $IS_PROMO } + {loop name="productSaleElements_promo" type="product_sale_elements" product=$product_id limit="1" order="min_price"} + {assign var="default_product_sale_elements" value=$ID} + {format_number number=$TAXED_PROMO_PRICE} {currency attr="symbol"} + {format_number number=$TAXED_PRICE} {currency attr="symbol"} + {/loop} + {else} + {format_number number=$BEST_TAXED_PRICE} {currency attr="symbol"} {/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} - -
    - {if $hasBtn == true} + {if $hasBtn == true} {form name="thelia.cart.add" } -
    + {form_hidden_fields form=$form} - + {if $form_error}
    {$form_error_message}
    {/if} @@ -71,13 +67,13 @@ {if $default_product_sale_elements } {else} - {loop name="productSaleElements_promo" type="product_sale_elements" product="{$ID}" limit="1"} + {loop name="productSaleElements_promo" type="product_sale_elements" product="{$product_id}" limit="1"} {/loop} {/if} {/form_field} {form_field form=$form field="product"} - + {/form_field}
    @@ -86,11 +82,11 @@