6. Shipping label Templates

Here you can configure the way our extension will export orders information into a csv, text of PDF file.

When you confirm the packing, the order information file is downloaded (called “shipping label”).

You can then import these files into your carrier software to print shipping labels.

General

Field Description
Name Set there the shipping template name
Status Set the status to Active to enable this shipping template
Type Select “Order details file export” for txt, csv & xml shipping templates. Set “simple address label” for PDF ones.
Associate shipping methods When shipping labels will be generated for an order, it will retrieve the matching templates based on the shipping method(s) selected there.

Export

There you can configure how the shipping label files are made.

Field Description
File name Name of shipping labels generated, must include file extension in the file name. Ex : for a CSV file, name will be “your_template_name.csv”.
Mime type Select shipping label type. Must match with the file extension provided in the “file name” option.
File header line Set scheme of file header (if exists). Most of the time this is the column’s names, separated by a coma or a semi-colon.
Header line for orders Set scheme of header line for each order in the template. You can use available codes there, putting them between curly brackets. Ex : for code “order.increment_id”, you have to write “{order.increment_id}”.
Line for each products in orders Set scheme of product lines in the template. This line is repeated for each product of an order.
Footer line for orders Set scheme of footer line in the template. This line is added at the end of each order.

Available codes

You can use codes to include order or product details within the export file. A code is added between curly brackets, for instance, to include the order number, use {order.increment_id} The list of every codes is available in the “Avalable codes” tab (there are generated using the last shipment.

Examples

Simple csv

  • File header line
order;customer_firstname;customer_lastname;weight;address;city;postcode;country
  • Header line for orders
{order.increment_id};{shippingaddress.firstname};{shippingaddress.lastname};{shipment.total_weight};{shippingaddress.street};{shippingaddress.city};{shippingaddress.postcode};{shippingaddress.country_id}
  • Output file
order;customer_firstname;customer_lastname;weight;address;city;postcode;country
000000008;Olivier;Zimmermann;3.00;12 rue des champs elysees;paris;75001;FR

Simple csv with products

  • Header line for orders
o;{order.increment_id};{shippingaddress.firstname};{shippingaddress.lastname};{shipment.total_weight};{shippingaddress.street};{shippingaddress.city};{shippingaddress.postcode};{shippingaddress.country_id}
  • Line for each products in orders
p;{orderitem.qty_shipped};{orderitem.sku};{orderitem.name};{product.barcode}
  • Output file
o;000000008;Olivier;Zimmermann;3.00;12 rue des champs elysees;paris;75001;FR
p;2;NOK1260;Nokia 2460 3G;3067263547372
p;1;headset12;Nokia headset 10122;3097263999972

Xml

  • File header line
<orders>
  • Header line for orders
<order id="{order.increment_id}">
  <shipto>
    <firstname>{shippingaddress.firstname}</firstname>
    <lastname>{shippingaddress.lastname}</lastname>
    <street>{shippingaddress.street}</street>
    <postcode>{shippingaddress.postcode}</postcode>
    <city>{shippingaddress.city}</city>
    <country>{shippingaddress.country_id}</country>
  </shipto>
  <products>
  • Line for each products in orders
<product sku="{orderitem.sku}" qty="orderitem.qty_shipped">
  • Footer line for orders
  </products>
</order>
  • Output file
<orders>
  <order id="000000008">
    <shipto>
      <firstname>olivier</firstname>
      <lastname>zimmermann</lastname>
      <street>12 rue des champs elysees</street>
      <postcode>75001</postcode>
      <city>Paris</city>
      <country>FR</country>
    </shipto>
    <products>
      <product sku="NOK1260" qty="2">
      <product sku="headset12" qty="1">
    </products>
  </order>
</orders>