GLS Magento 2 (EN) : 2. Configuration

2. Configuration

2.1 Shipping methods

The module created a new GLS shipping method in Stores > Configuration > Sales > Shipping Methods.

To activate the GLS shipping method on the website, it’s necessary to switch the “Enable” parameter on and fill up the fields “GLS webservice login” and “GLS  webservice password” whose values are provided by GLS.  

Warning : to use the official GLS module for Magento 2, you have to be a GLS customer. The use of the different GLS shipping methods is subject to the acceptance of GLS general terms and conditions. The activation of the GLS shipping methods of this module have to match with the prices lists signed with GLS. For more information, please get in touch with your GLS commercial contact.

If you’re not a GLS customer, please connect to www.gls-group.eu to discover all the GLS services and contact GLS.

The module is provided with a default configuration and all these parameters are editable in the menu Stores > Configuration > Sales > Shipping Methods > GLS, your transport partner :

  • Title: Label of the GLS shipping method group displayed on the website (for the proper functioning of the module, please put at least "GLS" in the title) 
  • Enable: By default disabled when installing the module. Switch on to see GLS shipping methods on the website
  • GLS webservice login: Provided by GLS
  • GLS webservice password: Provided by GLS
  • Maximum package weight : Maximum package weight that GLS can carry
  • GLS Chez vous : Enable or disable the “at home” shipping method

This service match the following GLS offers:

-   Business Parcel for your national shipments
Euro Business Parcel for your European shipments
Global Business Parcel for your international shipments

  • GLS Chez Vous setup: Configuration field, please see more explanations and examples below

  • GLS Chez Vous order: Set the order of appearance of the “at home” shipping method among GLS shipping methods

  • GLS Chez Vous +:  Enable or disable the “at home” shipping method

This service match the GLS offer : Flex Delivery Service

  • GLS Chez Vous + setup: Configuration field, please see more explanations and examples below

  • GLS Chez Vous + order: Set the order of appearance of the “at home” shipping method among GLS shipping methods

  • GLS Point Relais: Enable or disable the relay shipping method

This service match the GLS offer: Shop Delivery Service

  • Google Maps API Key: API key to use the relay shipping method to locate the relays on a Google Maps (See: 5.1 Generation of the Google Maps API Key to learn how to generate this key)

  • GLS Point Relais setup: Configuration field, please see more explanations and examples below

  • GLS Point Relais order: Set the order of appearance of the relay shipping method among GLS shipping methods

  • Only XL shop search: Enable the display of XL relays only (disabled by default)

  • GLS Avant 13H: Enable or disable the express shipment before 1pm

This service match the GLS offer: Express Parcel Guaranteed

  • GLS Avant 13H setup: Configuration field, please see more explanations and examples below

  • GLS Avant 13H order: Set the order of appearance of the express shipping method among GLS shipping methods

  • Tracking URL: Used to generate shipment tracking URL

  • Debug: Allow to enable the module debugging function for the shipping costs calculation (Advanced function for developer)

  • GLS module order: set the order of appearance of the GLS shipping methods group among other shipping methods

The configuration fields use a PHP format syntax used by the OWEBIA module for Magento 2, whose  documentation is here.

For example, here is the provided configuration for at home shipment:

  1. title : label displayed on the website for this shipping method
  2. enabled : activation conditions for this method. In this example, the method will be displayed only if the destination country is France
  3. price : shipping fees for this method. In this example, if the cart total weight is less than or equal to 150, the fees will be 5, if the cart total weight is less than or equal to 160, the fees will be 3 and in other cases, it will be 0

It’s possible to add filters on customer group, product categories etc … (for more informations, please check documentation).

Many methods can be created for one configuration field. To do that, you have to duplicate the addMethod function by defining others rules.

Warning: in the method name (ex: tohome_fr above), only the part before the underscore can be edit

2.2 GLS Advanced Setup

2.2.1 General Configuration

Agency code: GLS agency code you are linked to. Information provided by GLS

2.2.2 Import/export configuration

This section contains the configuration to manage the import and export of GLS orders. For more information about import and export, please check 4. Import/Export.

  • Active: Activation of automatic import/export through a cron task
  • Frequency: Cron task frequency in minutes (every X minutes)
  • Cron expression: Cron expression generated from frequency field (if the you can't see the modification after saving, please refresh Magento configuration cache)
  • Import folder: Folder in which there are the orders to import
  • Export folder: Folder in which the exported orders are downloaded
  • Status of orders to export: Status of orders to export for automatic export through the cron task

Still need help? Contact Us Contact Us