diff --git a/core/lib/Thelia/Core/Template/Loop/Cart.php b/core/lib/Thelia/Core/Template/Loop/Cart.php index 5c08b2896..5dc40218b 100755 --- a/core/lib/Thelia/Core/Template/Loop/Cart.php +++ b/core/lib/Thelia/Core/Template/Loop/Cart.php @@ -102,6 +102,7 @@ class Cart extends BaseLoop ->set("TAXED_PRICE", $cartItem->getTaxedPrice($taxCountry)) ->set("PROMO_TAXED_PRICE", $cartItem->getTaxedPromoPrice($taxCountry)) ->set("IS_PROMO", $cartItem->getPromo() === 1 ? 1 : 0); + $loopResultRow->set("PRODUCT_SALE_ELEMENTS_ID", $productSaleElement->getId()); $result->addRow($loopResultRow); } diff --git a/templates/default/cart.html b/templates/default/cart.html index 93daed310..1135ae1b6 100644 --- a/templates/default/cart.html +++ b/templates/default/cart.html @@ -54,70 +54,73 @@ - {loop type="cart" name="cartloop"} + {nocache} + {loop type="cart" name="cartloop"} - - - - {assign "cart_count" $LOOP_COUNT} - {ifloop rel='product-image'} - {loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"} - Product #{$cart_count} - {/loop} - {/ifloop} - {elseloop rel="product-image"} - {images file='assets/img/product/1/118x85.png'}Product #{$cart_count}{/images} - {/elseloop} - - -

- Product #{$LOOP_COUNT} -

-
-
-
{intl l="Available"} :
-
{intl l="In Stock"}
-
{intl l="No."}
-
{$REF}
- {*
Select Size
-
Large
-
Select Delivery Date
-
Jan 2, 2013
-
Additional Option
-
Option 1
*} -
-
- {intl l="Remove"} - - - {if $IS_PROMO == 1} - {assign "real_price" $PROMO_TAXED_PRICE} -
{currency attr="symbol"} {$PROMO_TAXED_PRICE}
- {intl l="instead of"} {currency attr="symbol"} {$TAXED_PRICE} - {else} - {assign "real_price" $TAXED_PRICE} -
{currency attr="symbol"} {$TAXED_PRICE}
- {/if} - - -
-
- - -
-
- - - {currency attr="symbol"} {$real_price * $QUANTITY} - - - - {/loop} + + + + {assign "cart_count" $LOOP_COUNT} + {ifloop rel='product-image'} + {loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"} + Product #{$cart_count} + {/loop} + {/ifloop} + {elseloop rel="product-image"} + {images file='assets/img/product/1/118x85.png'}Product #{$cart_count}{/images} + {/elseloop} + + +

+ {$TITLE} +

+
+
+
{intl l="Available"} :
+ {if $STOCK > 0} +
{intl l="In Stock"}
+ {else} +
{intl l="Out of Stock"}
+ {/if} +
{intl l="No."}
+
{$REF}
+ {loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID"} +
{$ATTRIBUTE_TITLE}
+
{$ATTRIBUTE_AVAILABILITY_TITLE}
+ {/loop} +
+
+ {intl l="Remove"} + + + {if $IS_PROMO == 1} + {assign "real_price" $PROMO_TAXED_PRICE} +
{currency attr="symbol"} {$PROMO_TAXED_PRICE}
+ {intl l="instead of"} {currency attr="symbol"} {$TAXED_PRICE} + {else} + {assign "real_price" $TAXED_PRICE} +
{currency attr="symbol"} {$TAXED_PRICE}
+ {/if} + + +
+
+ + +
+
+ + + {currency attr="symbol"} {$real_price * $QUANTITY} + + + {/loop} + {/nocache} @@ -137,38 +140,34 @@ - + {/ifloop} {/block} {block name="javascript-initialization"} - + $cart(this).parent().submit(); + }) + }); + {/block} \ No newline at end of file diff --git a/templates/default/includes/mini-cart.html b/templates/default/includes/mini-cart.html new file mode 100644 index 000000000..014cbf531 --- /dev/null +++ b/templates/default/includes/mini-cart.html @@ -0,0 +1,61 @@ +{ifloop rel="cartloop"} + +{/ifloop} +{elseloop rel="cartloop"} + +{/elseloop} \ No newline at end of file diff --git a/templates/default/layout.tpl b/templates/default/layout.tpl index 84acb4800..558e39bba 100644 --- a/templates/default/layout.tpl +++ b/templates/default/layout.tpl @@ -104,63 +104,7 @@ URL: http://www.thelia.net Cart {cart attr="count_item"} - - + {include file="includes/mini-cart.html"}