Skip to main content


The postage Smarty block retrieves the postage amount of the current cart if it exists.

The delivery country is choosen with the first available value :

  1. Either the country of the delivery address of the customer related to the cart if it exists
  2. Or the country saved in cookie if customer have changed the default country
  3. Or the default country for the shop if it exists

The function select the cheapest delivery for this country.


Inside the postage block these variables are defined :

Parameter nameDescription
$country_idThe country id or null
$delivery_idThe delivery id or null
$postageThe postage amount or 0.0
$is_customizableIndicate if the postage can be customized. False When customer is signed and have a valid delivery address

An implementation for the default front office template

{assign var="postageAmount" value=$postage }
<td class="product" colspan="2">
<form action="{url path="/cart/country"}" class="form-inline" method="post">
{intl l="Estimated shipping "}
{if $is_customizable == false}
{loop type="country" name="countryLoop" id="$country_id"}
{intl l="for"} {$TITLE}
{if $is_customizable}
<label for="cart-country">{intl l="Select your country:"}</label>
<select id="cart-country" name="country">
{loop type="country" name="countryLoop" with_area="true"}
<option value="{$ID}" {if $ID == $country_id }selected="selected" {/if}>{$TITLE}</option>
<a class="btn btn-change-country" href="#"><i class="icon-refresh"></i> {intl l="update"}</a>
{if $delivery_id != 0 }
{intl l="with:"} {loop type="delivery" name="deliveryLoop" id=$delivery_id}{$TITLE} {/loop}
<div class="alert alert-danger">
{intl l="No deliveries available for this cart and this country"}
<td class="unitprice">{$postage} {currency attr="symbol"}</td>
<td class="qty">-</td>
<td class="subprice">{$postage} {currency attr="symbol"}</td>
<td colspan="3" class="empty">&nbsp;</td>
<th class="total">{intl l="Total"}</th>
<td class="total">
<div class="total-price">
{assign var="totalAmount" value={cart attr='total_taxed_price_without_discount'} + $postageAmount }
<span class="price">{$totalAmount} {currency attr="symbol"}</span>