{intl l="Your Cart"}

{ifloop rel="cartloop"} {include file="misc/checkout-progress.tpl" step="cart"} {hook name="cart.top"} {loop type="amp_cart_id" name="cartidloop"} {assign "card_id" $CART_ID} {/loop} {loop type="colissimo.maxweight.loop" name="colissimo.maxweight.loop"} {assign "maxweight" $MAX_WEIGHT} {/loop}
{assign "postageAmountTotalEstimation" 0} {loop type="ampseller" name="sellers"} {ifloop rel="cartitem"} {assign "shippingOK" 1} {assign "weightItems" 0} {assign "weightTotalSeller" 0} {loop type="amp_cart_seller_item" amp_seller_id=$ID cart_id=$card_id name="cartitem"} {assign "quantity" $QUANTITY} {loop type="product_sale_elements" id=$PRODUCT_SALE_ELEMENTS_ID name="productweight"} {assign "weightItems" $WEIGHT*$quantity} {/loop} {assign "weightTotalSeller" $weightTotalSeller+$weightItems} {/loop} {if $weightTotalSeller > $maxweight} {assign "shippingOK" 0} {/if} {if $weightTotalSeller <= $maxweight and $weightTotalSeller >0} {assign "postageAmountEstimation" 0} {else} {/if} {/ifloop} {/loop} {$discount={order attr="discount"}} {if $discount} {/if}
  {intl l="Name"} {intl l="Price"} {intl l="Qty"} {intl l="Total"}

{$TITLE}

{assign var="product_image_url" value=null} {ifloop rel="pse-first-image"} {loop type="product-sale-elements-image" name="pse-first-image" product_sale_elements_id=$PRODUCT_SALE_ELEMENTS_ID limit="1"} {loop type="image" name="product-image" id=$PRODUCT_IMAGE_ID product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"} {assign var="product_image_url" value=$IMAGE_URL} {/loop} {/loop} {/ifloop} {elseloop rel="pse-first-image"} {loop type="image" name="product-image" product=$PRODUCT_ID limit="1" width="118" height="85" force_return="true"} {assign var="product_image_url" value=$IMAGE_URL} {/loop} {/elseloop} {if $product_image_url} Product #{$LOOP_COUNT} {else} Product #{$LOOP_COUNT} {/if}

{$TITLE}

{intl l="Available"} :
{if $STOCK > 0}
{intl l="In Stock"}
{else} {$errorStock="TRUE"}
{intl l="Out of Stock"}
{/if} {loop type="product_sale_elements" name="ref" id=$PRODUCT_SALE_ELEMENTS_ID}
{intl l="No."}
{$REF}
{/loop} {loop type="attribute_combination" name="product_options" product_sale_elements="$PRODUCT_SALE_ELEMENTS_ID" order="manual"}
{$ATTRIBUTE_TITLE}
{$ATTRIBUTE_AVAILABILITY_TITLE}
{/loop}
{intl l="Remove"}
{if $IS_PROMO == 1} {assign "real_price" $PROMO_TAXED_PRICE} {assign "real_total_price" $TOTAL_PROMO_TAXED_PRICE}
{format_money number=$PROMO_TAXED_PRICE}
{intl l="instead of"} {format_money number=$TAXED_PRICE} {else} {assign "real_price" $TAXED_PRICE} {assign "real_total_price" $TOTAL_TAXED_PRICE}
{format_money number=$TAXED_PRICE}
{/if}
{if $STOCK <= 500} {else} {/if}
{format_money number=$real_total_price}
{$weightTotalSeller} Kg {loop type="amp_cart_weight_postage_estimation" weight="$weightTotalSeller" name="cartitempostageestimationtest"} {assign "postageAmountEstimation" $POSTAGE_AMOUNT} {intl l="Estimated shipping seller"} {/loop} {format_money number=$postageAmountEstimation} {assign "postageAmountTotalEstimation" $postageAmountTotalEstimation+$postageAmountEstimation}
{intl l="Total weight exceeds colissimo %max_weight" max_weight=$maxweight} ( {$weightTotalSeller} Kg )

{intl l="Estimated shipping "}

{if $shippingOK == 1} {format_money number=$postageAmountTotalEstimation} {else} ---- {/if} - {if $shippingOK == 1} {format_money number=$postageAmountTotalEstimation} {else} ---- {/if}
  {form name="thelia.order.coupon"}
{form_hidden_fields} {form_field field='success_url'} {/form_field} {form_field field='error_url'} {/form_field} {form_field field='coupon-code'}
{if $form_error_message}{$form_error_message nofilter}{/if}
{/form_field}
{/form}
  {intl l="Discount"} {format_money number=$discount}
  {intl l="Total incl. taxes"}
{if $shippingOK == 1} {assign var="totalAmount" value={cart attr='total_taxed_price'} + $postageAmountTotalEstimation } {format_money number=$totalAmount} {else} ---- {/if}
{intl l="Continue Shopping"} {intl l="Proceed checkout"} {/ifloop} {elseloop rel="cartloop"}
{intl l="Warning"}! {intl l="You have no items in your shopping cart."}
{/elseloop} {hook name="cart.bottom"}