Mondial Relay Magento 2

French English

Official Extension for Magento and Adobe Commerce

Requirements

Magento

  • Magento from 2.4.0 to 2.4.7, OpenSource / Adobe Commerce / Mage-OS.

PHP

  • PHP >= 8.0
  • SOAP extension (php-soap) for pickup delivery and printing shipping labels
  • SimpleXML extension (php-simplexml) to print shipping labels with API V2 (Dual Carrier)

Configuration

Activation of the Mondial Relay & InPost delivery method is done from the menu:

Stores > Configuration > Sales > Shipping Methods > Mondial Relay / InPost

  • Version: version of the module
  • Enabled: enable shipping methods
  • Collection Mode: collect packages from a pickup (REL) or your warehouse (CCC)
  • API URL: API URL
  • API Company: data to be retrieved in your account: configuration of APIs
  • API key: data to be retrieved in your account: configuration of APIs
  • API Brand Code: data to be retrieved in your account: configuration of APIs
  • Test API V1 credentials: test API V1 connection settings
  • API V2: enable API V2. API V2 allows home delivery anywhere in Europe with the Dual Carrier. You need activate API V2 from your account.
    • Mode: sandbox or production mode
    • Brand Id API: data to be retrieved in your account: configuration of APIs
    • Login API: data to be retrieved in your account: configuration of APIs
    • Password API: data to be retrieved in your account: configuration of APIs
    • Test API V2 credentials: test API V2 connection settings
  • Sort Order: position of the method in the checkout
  • Show Method if Not Applicable: show the method even if it cannot apply to the customer's shipping address
  • Displayed Error Message: Message displayed if the method cannot be applied to the customer's delivery address

Shipping Label

  • Label Size: PDF format of the label to generate (10x15, A4, A5)
  • Shipper name: Shipper's name displayed on label (store name if empty)
  • Delete label after: Delete labels from database X day(s) after generation. This configuration ensures that the database is not overloaded with obsolete data.
  • Shipping status: Shipment status once the label has been generated
  • Default Packaging weight: Add a default packaging weight in package weight calculation

Return

  • Return Type: Return the package to an address (LCC) or to a Point Relais®
  • Company: Return recipient
  • Email: Email of the recipient handling the return
  • Phone Number: Phone of the recipient handling the return
  • Postcode: Postal code for return pickups
  • Country: Country for return pickups

Point Relais® return type

  • Pickup location: Pickup location to collect the return. The list is loaded with the configured postal code and country (save configuration tu update).

LCC return type

  • Street: Return address number and street
  • City: Return address city

Limit

  • Debug: Display in pickup pop-in the current cart data with applied limitation
  • Weight Limit: Enable weight limit for method selection
  • Weight Calculation:
    • Per product: Limit on the weight of the highest product in the cart. Allows you to ship several Packages if the weight limit authorized for all the products in the order is exceeded.
    • Per cart: limit on the total weight of the products in the cart. If the limit is exceeded, the method will not be displayed.
  • Size Limit: Enable the packaging size limit for method selection (L + W + H in cm)
  • Size Calculation:
    • Per product : Limit on the size of the highest product in the cart. Allows you to ship several Packages if the size limit authorized for all the products in the order is exceeded.
    • Per cart : limit on the total size of the products in the cart. If the limit is exceeded, the method will not be displayed.
  • Product Length Attribute: Product attribute length to use in the size calculation, must be a text field with a number in centimeter.
  • Product Width Attribute: Product attribute width to use in the size calculation, must be a text field with a number in centimeter.
  • Product Height Attribute: Product attribute height to use in the size calculation, must be a text field with a number in centimeter.

Shipping Methods

Enabled the delivery methods:

  • Pickup and Lockers (MED, 24L, APM)
  • Home Delivery (HOM)

Parameters :

  • Enabled: Enable the method
  • Name: method name
  • Maximum Weight: maximum weight accepted for method display (see limitation options for calculation)
  • Maximum Size: maximum size accepted for method display (see limitation options for calculation)
  • Price: method price (country / amount / weight (from) / weight (to) / Free). For a single rate, leave the "weight (from)" and "weight (to)" fields empty. The free amount is applied according to the including tax subtotal of the cart with discounts.
  • Fee: apply a fee depending on a postal code. The fee amount is added to the shipping base price.
    • 20000 : the postal code must be exactly 20000
    • 20* : the postal code must start with 20
  • Ship to Specific Countries: Method will be displayed only for selected countries
  • Default Insurance: Insurance level to apply by default
  • Sort Order: Method sort order in checkout

Only with Points Relais® :

  • Available methods: Point Relais® methods to activate. The selected methods determine the maximum weight authorized for displaying the method (L, XL or Lockers).
  • Map Type : Google Maps (paid) or OpenStreetMap (free)
  • Open pickup list on shipping method selection: Open the pop-in Pickup selection directly by clicking on the delivery method. Otherwise, open the pop-in by clicking on the "Continue" button.
  • Number of pickup: Number of pickups to display on the map
  • Default address: allows to use a default address for the Pickup list if the customer has not entered any address before selecting the method

Price configuration

For flat rate pricing, the price configuration must be:

Price Country Weight (from) Weight (to)
5.90 France

Pour table rate pricing, the price configuration must be:

Price Country Weight (from) Weight (to)
5.38 France 250
5.98 France 250 500
6.70 France 500 750
7.26 France 750 1000
8.06 France 1000

Warning : If the weight of the cart exceeds the maximum weight defined in the prices, the method will always be displayed with a price of 0. It is recommended not to limit the highest price (leave the field empty).

Test Settings

API V1

  • API URL: https://api.mondialrelay.com/Web_Services.asmx?WSDL
  • API Company: BDTEST13
  • API key: TestAPI1key
  • API Brand Code: 11

API V2

  • Mode Sandbox
  • Brand Id API: BDTEST
  • Login API: BDTEST@business-api.mondialrelay.com
  • Password API: '2crtPDo0ZL7Q*3kLumB

Print labels

Configuration

Before create a label, the following native settings must be configured:

Store > Configuration > Sales > Shipping settings > Origin

Complete all fields (product warehouse address).

Store > Configuration > General > General > Store information

  • Store name : the business name of the store
  • Store phone number : store phone number

Label grid

A label grid is available from the menu:

Sales > Mondial Relay / InPost > Shipping Labels

Actions

Depending on shipment status, 4 actions are possible:

Mondial Relay order actions

Waiting for shipment

  • Create shipment and label: create a single shipment and generate a label.
  • Create multiple shipments and labels based on product weight: optional, only available with "per product" weight calculation. If the total product weight is greater than the weight allowed for a package, the system auto-create multiple shipments.

Waiting for Label

  • Create Label: Generate a label.
  • Print Packing Slip: Download the PDF of the packing slip (native).

Ready

  • Print Label: Download the PDF of the label.
  • Print Packing Slip: Download the PDF of the packing slip (native).

Status and weight

Clicking on a command line allows you to modify 3 fields:

Mondial Relay shipping update
  • Shipping Status: Allows you to assign a status to the shipment. A status is automatically assigned when the label is created. This status must be defined in the configuration.
  • Weight: Package weight in kgs or lbs. The weight of the package can no longer be modified once the shipment has been created.
  • Packaging Weight: Package weight in kgs or lbs.

Mass actions

5 actions are proposed:

Mass actions Mondial Relay
  • Create Shipments and print Labels: Add shipments, create and download labels for selected orders.
  • Print Shipping Labels: Download a PDF file containing the labels of the selected orders.
  • Print Packing Slips: Download a PDF file containing the Packing Slips (native).
  • Print Deposit File: Download a PDF file of packages for selected orders.
  • Update Shipping Status: Change the delivery status of selected orders.

Example of a Deposit File:

Mondial Relay Deposit File

Manual label creation

On the order shipping creation view, check the "Create Shipping label" option (if you omit to check the box, the label may be generated later).

Mondial Relay shipping label checkbox

In the next window, select the products to add to the package. You can only create one package for a single shipment. The weight is automatically retrieved from the "weight" attribute. You can manually adjust the value, for example to add the weight of the packaging. Select the insurance level (0 to 5). The other fields (length, width, depth) are not used.

Add a new package

Note: the weight of the package can be in kilograms (kgs) or pounds (lbs)

The shipment is created, the package number is automatically associated and sent by mail to the customer.

Automatic label creation

On the order shipping creation view, check the "Auto Create Shipping Label" option (if you omit to check the box, the label may be generated later).

Create Shipping Label

The label is automatically created according to the order data and default configurations.

Note : if an error occurs when generating the label, the shipment is still created. You can fix the errors and then re-create the label manually from the shipping view.

Finally, you can print the label from the order grid, by selecting the orders, then selecting the "Print labels" action.

If the order already contains a shipment, you can generate or re-generate a label from the order shipping view.


Return labels

The module allows the merchant to generate a return label for a customer, without the customer needing to pay for delivery.

The customer drops off the package at any pickup location. The package is sent to another pickup location chosen by the merchant, or to the merchant warehouse (LCC, see conditions).

Adobe Commerce

Label generation can be done via the RMA module if it is activated (native functionality).

Generating the label is possible as long as at least one product has been authorized.

The Point Relais® or the warehouse address (LCC) is defined in the configuration:

Stores > Configuration > Sales > Shipping Methods > Mondial Relay / InPost > Return

The customer can print the label from their account.

Magento OpenSource

The return label creation is allowed when the order has been shipped (delivery generated). On the command view, a Mondial Relay Return button appears:

Create the return shipping label

The form allows you to add:

  • the shipper address (automatically filled from customer order billing address)
  • the recipient address: a Point Relais® or a warehouse location (LCC).

The list of Point Relais® for return can be modified from the configuration: Stores > Configuration > Sales > Shipping Methods > Mondial Relay / InPost > Return

  • Postcode: Postal code of the pickup locations for the return
  • Country: Country of the pickup locations for the return

From the configuration, you can add a default Point Relais® or a default shipping address (LCC).

Validating the form generates the return label. It is necessary to save the PDF file and send it to the customer manually. A download link to share with the customer is also available.


API

List of REST Endpoints

GET    /V1/guest-carts/:cartId/mondialrelay-pickup
PUT    /V1/guest-carts/:cartId/mondialrelay-pickup/:pickupId/:countryId/:code
DELETE /V1/guest-carts/:cartId/mondialrelay-pickup
GET    /V1/guest-carts/:cartId/mondialrelay-pickup/list/:countryId/:postcode
GET    /V1/guest-carts/:cartId/mondialrelay-pickup/list

GET    /V1/carts/mine/mondialrelay-pickup
PUT    /V1/carts/mine/mondialrelay-pickup/:pickupId/:countryId/:code
DELETE /V1/carts/mine/mondialrelay-pickup
GET    /V1/carts/mine/mondialrelay-pickup/list/:countryId/:postcode
GET    /V1/carts/mine/mondialrelay-pickup/list

GET    /V1/mondialrelayPickup/:pickupId/:countryId
GET    /V1/mondialrelayPickup
GET    /V1/mondialrelayPickup/:orderId

Point Relais® or Locker data ("mondialrelay_code" and "mondialrelay_pickup_id") are available on the shipping address of the native endpoints:

GET    /V1/orders/:id
GET    /V1/orders

Example:

"extension_attributes": {
  "shipping_assignments": [{
    "shipping": {
      "address": {
        "address_type": "shipping",
        "city": "LILLE",
        "company": "DIGITAL LOUNGE AND LABS",
        "country_id": "FR",
        "email": "65548402568cb@example.com",
        "entity_id": 468,
        "firstname": "John",
        "lastname": "Doe",
        "parent_id": 235,
        "postcode": "59000",
        "region": "Nord",
        "region_code": "59",
        "region_id": 247,
        "street": ["35 RUE DU FAUBOURG DES POSTES"],
        "telephone": "0610203040",
        "extension_attributes": {
          "mondialrelay_code": "MED",
          "mondialrelay_pickup_id": "023120"
        }
      }
    }
  }
}

Examples

Retrieve a list of pickups

GET https://www.domain.tld/index.php/rest/V1/mondialrelayPickup?
    searchCriteria[filter_groups][0][filters][0][field]=country&
    searchCriteria[filter_groups][0][filters][0][value]=FR&
    searchCriteria[filter_groups][1][filters][0][field]=city&
    searchCriteria[filter_groups][1][filters][0][value]=Paris&
    searchCriteria[filter_groups][2][filters][0][field]=postcode&
    searchCriteria[filter_groups][2][filters][0][value]=75008

Retrieve data from a pickup point

GET https://www.domain.tld/index.php/rest/V1/mondialrelayPickup/016485/FR

Retrieve data from a pickup point for an order

GET https://www.domain.tld/index.php/rest/V1/mondialrelayPickup/1