From 6e5feaf8e99c6000a067578da01826969ad6fabd Mon Sep 17 00:00:00 2001 From: Emmanuel Nurit Date: Thu, 13 Feb 2014 15:48:28 +0100 Subject: [PATCH 1/6] [Front office] Modifying upsell products Display off upsell products is now based on accessory loop but not promo products --- .../default/includes/addedToCart.html | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/templates/frontOffice/default/includes/addedToCart.html b/templates/frontOffice/default/includes/addedToCart.html index e90fc6029..e880dbeb5 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=$smarty.get.product_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} From 814dfedaf37a2266ba558084f701c62540032174 Mon Sep 17 00:00:00 2001 From: Emmanuel Nurit Date: Thu, 13 Feb 2014 16:06:43 +0100 Subject: [PATCH 2/6] [Front office] Modifying upsell products Display of upsell products is now based on accessory loop but not promo products --- templates/frontOffice/default/assets/js/script.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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, From ec0dddd62da1a591b39a7d860b8c91a82d524e34 Mon Sep 17 00:00:00 2001 From: Emmanuel Nurit Date: Thu, 13 Feb 2014 16:07:42 +0100 Subject: [PATCH 3/6] [Front office] Modifying upsell products Display off upsell products is now based on accessory loop but not promo products --- .../default/includes/single-product.html | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/templates/frontOffice/default/includes/single-product.html b/templates/frontOffice/default/includes/single-product.html index ff1edc590..600a6962f 100644 --- a/templates/frontOffice/default/includes/single-product.html +++ b/templates/frontOffice/default/includes/single-product.html @@ -1,22 +1,24 @@
  • {assign var="hasSubmit" value = false} {assign var="productTitle" value="{$TITLE}"} - + {if not $product_id} + {assign var="$product_id" value=$ID} + {/if}
    - {loop name="brand.feature" type="feature" product=$ID title="brand"} - {loop name="brand.value" type="feature_value" feature=$ID product=$product_id} + {loop name="brand.feature" type="feature" product=$product_id title="brand"} + {loop name="brand.value" type="feature_value" feature=$product_id product=$product_id} {/loop} {/loop} - {loop name="brand.feature" type="feature" product=$ID title="isbn"} + {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}