Skip to content

CountryShippingCost

The CountryShippingCost object represents shipping costs in a country.

classDiagram
  direction LR
  CountryShippingCost --> Country
  CountryShippingCost --> ShippingCostsList
  ShippingCostsList "1" --o "*" ShippingCost
  class ShippingCost{
  }
  class CountryShippingCost{
    Country country
    ShippingCostsList shippingCosts
    Price lowestShippingCost
  }

Properties

Attribute name Type Description
country Country The Country object representing the country of the shipping methods.
shippingCosts ShippingCostsList The ShippingCostsList object is a list of shipping methods and their costs in the specified country. They are sorted in the order set in the admin panel.
lowestShippingCost Price The Price object representing the lowest shipping cost for the specified country.

Examples

Country property

{{ countryShippingCost.country.name }}
Poland

ShippingCosts property

{% for shippingCost in countryShippingCost.shippingCosts %}
    {{ shippingCost.shipping.name }} - {{ shippingCost.price.formatGross }}
{% endfor %}
InPost - 12.99 zł
GLS - 14.99 zł

ShippingCosts property

{{ countryShippingCost.lowestShippingCost.formatGross }}
12.99 zł