Returns the available shipping methods for an order.


Uses of shipping_methods function appear in Skeletal in the cart section (both in /includes/shipping_options and /shopping_cart), as well as in product page in products/includes/buying_options for the shipping calculator.

The following example is used on the cart page to generate a form input that will allow the customer to select the shipping method they want to use with regards to their order:

[%shipping_methods country:'[@ship_country@]' zip:'[@ship_zip@]'%]
    [%param header%]
        <form method="post" name="SHsummary" action="[%url page:'checkout'/%]">
    [%param *body%]
        <div class="form-group">
            <label class="label-block" for="[@id@]">
                <input class="pull-left" type="radio" onclick="document.SHsummary.submit()" name="ship" value="[@id@]" id="[@id@]" [%if [@id@] == [@shipping_method_id@]%]checked[%/if%]>
                <h4> [@shipping_method@] - [%if [@shipping_quote@]%] P.O.A [%else%] [%if [@cost@] == 0%] [%if [@na@] == 0%] [%if [@config:free_shipping_label_for_webstore@]%] [@config:free_shipping_label_for_webstore@] [%else%] Free [%/if%] [%else%] Not Applicable [%/if%] [%else%] [%format type:'currency'%][@cost@][%/format%] [%/if%] [%/if%] </h4>
                [%if [@delivery_time@] >= 1%]
                    <p>Estimated arrival of [%format type:'number' tl_unit:'day' tl_plural:'days'%][@delivery_time@][%/format%]</p>
    [%param footer%]
            <td>Shipping Cost To Post Code [@ship_zip@]</td>
            <td class="text-right">[%format type:'currency'%][@shipping_total@][%/format%]</td>
    [%param ifempty%]
        Enter post code to calculate shipping

The following example is for the shipping calculator used on the product page. It is used to return the name and cost of the shipping methods based on the country and postal/zip code the shopper enters:

[%shipping_methods sortby:'delivery_time' sku:'[@SKU@]' qty:'[@qty@]' zip:'[@ship_zip@]' country:'[@ship_country@]'%]
    [%PARAM *header%]
        <div role="alert" aria-atomic="true" aria-label="Shipping results">
    [%/ PARAM%]
    [%PARAM *body%]
        <div role="group" aria-label="Shipping method option">
            <hr aria-hidden="true"/>
            <strong>[@shipping_method@]</strong> - [%if [@cost@] == 0%] [%if [@na@] == 0%] [%if [@config:free_shipping_label_for_webstore@]%] [@config:free_shipping_label_for_webstore@] [%else%] Free [%/if%] [%else%] Not Applicable [%/if%] [%else%] [%format type:'currency'%][@cost@][%/format%] [%/if%] [%IF [@delivery_time@]%](ETA: [@delivery_time@] days)[%END IF%]<br />
            <i class="text-muted">[@shipping_description@]</i>
    [%/ PARAM%]
    [%PARAM *footer%]
    [%END PARAM%]
    [%PARAM *ifempty%]
        [%if [@ship_zip@]%]<p class="alert alert-danger alert-shipping-error" aria-label="alert" role="alert" aria-atomic="true">Shipping not available to selected location.</p>[%/if%]
    [%/ PARAM%]
[%/ shipping_methods%]


shipping_methods is used in a few different ways. As per the two examples above, it can be used to select the preferred shipping method for an order on the cart/checkout pages, or as a shipping calculator for an individual item on their product page.

shipping_methods Parameters

Name Options Description
ship_mode:'' HTML & b@se tags Refers to the checkout method, b for shipping to Billing, p for pickup, s for shipping to a different address and m for shipping to multiple addresses
addr_id:'' HTML & b@se tags ID of customer's saved shipping address. Can be used to break down that information with multiple sub-components
country:'' HTML & b@se tags Country of Billing, if no country is specified, the site's default country code will be used
limit:'' HTML & b@se tags List limit for number of shipping methods returned
noduplicate:'' HTML & b@se tags True/false value to show/remove duplicate methods
ship_method:'' HTML & b@se tags Shipping method
showhidden:'' HTML & b@se tags True/false show hidden shipping methods
showna:'' HTML & b@se tags True/false show non-applicable shipping methods
showall:'' HTML & b@se tags True/false show all shipping methods
zip:'' HTML & b@se tags Billing zip/postcode
city:'' HTML & b@se tags Billing city
state:'' HTML & b@se tags Billing state
sku:'' HTML & b@se tags SKU of product
qty:'' HTML & b@se tags Quantity of product
ship_express:'' HTML & b@se tags True/false whether or not shipping method has been marked as express shipping
ship_priority:'' HTML & b@se tags True/false whether or not priority shipping is active
cutoff:'' HTML & b@se tags Order cutoff date
routing_sortby:'' HTML & b@se tags Selects shipping method sort order between actual_cost, sortorder and delivery_time
sortby:'' HTML & b@se tags Synonym of routing_sortby
header HTML & b@se tags Renders a single usable space above the body
body* HTML & b@se tags Runs an array for each option in the tag
footer HTML & b@se tags Renders a single usable space below the body
ifempty:'' HTML & b@se tags If the shipping_methods returns no results, it'll load this block instead

order_refunds Data Tags

Name Options
[@sku@] A product's SKU
[@actual_cost@] Price of the shipping method.
[@sortorder@] The order shipping methods are displayed, as set by the merchant in the control panel
[@delivery_time@] Expected delivery time of shipping method
[@rma_id@] The ID of the Return Merchant Authorisation in neto
[@rma_status@] The status of the Return Merchant Authorisation in neto
[@qty@] A product's quantity
[@ship_country@] The selected shipping country
[@ship_zip@] The selected shipping zip/postcode
[@shipping_method_id@] The selected shipping method's ID
[@shipping_method@] The selected shipping method
[@shipping_quote@] A quote for this shipping method
[@cost@] The selected shipping cost
[@shipping_description@] The selected shipping method's description
[@shipping_total@] The total cost of selected shipping
[@na@] The param field is non-applicable

Was this article useful?

Be notified when this page is updated. Optional.