{extends file="layout.tpl"} {block name="init"} {$errorStock = "FALSE"} {/block} {* Body Class *} {block name="body-class"}page-cart{/block} {* Breadcrumb *} {block name='no-return-functions' append} {$breadcrumbs = [ ['title' => {intl l="Cart"}, 'url'=>{url path="/cart"}] ]} {/block} {block name="main-content"}

# {intl l="Your Cart"}

{ifloop rel="cartloop"} {include file="misc/checkout-progress.tpl" step="cart"}
{intl l="We apologize but some of the ordered products are not available any more."}
{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}

| {intl l="Product Name"} {intl l="Name"} | {intl l="Unit Price incl. taxes"} {intl l="Price"} | {intl l="Quantity"} {intl l="Qty"} | {intl l="Total incl. taxes"} {intl l="Total"}
--- | --- | --- | --- | ---
{assign "postageAmountTotalEstimation" 0} {loop type="ampseller" name="sellers"} {ifloop rel="cartitem"}
#### {$TITLE}
{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 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} {else} {/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}
{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}
{$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} {else}
{intl l="Total weight exceeds colissimo %max_weight" max_weight=$maxweight} ( {$weightTotalSeller} Kg )
{/if} {/ifloop} {/loop}
### {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'} {intl l='Code :'} {if $form_error_message}{$form_error_message nofilter}{/if} {/form_field} {/form}
{$discount={order attr="discount"}} {if $discount}
| {intl l="Discount"} | {format_money number=$discount}
{/if}
| {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"}
{ifloop rel="product_upsell"}

### {intl l="Upsell Products"}

{loop name="product_upsell" type="product" promo="yes" limit="5"} {include file="includes/single-product.html" colClass="col-md-2" product_id=$ID hasBtn=false hasDescription=true width="218" height="146"} {/loop}

{/ifloop}
{/block} {block name="after-javascript-include"}
{hook name="cart.after-javascript-include"} {/block} {block name="stylesheet"} {hook name="cart.stylesheet"} {/block} {block name="javascript-initialization"} {hook name="cart.javascript-initialization"} {/block}