An order's Shipments tab right after Transmit to MRW: the message with MRW shipment number 04700F004218, the same number as the shipment's tracking link, and its operations open on MRW label and Cancel MRW shipment.
The Transmit to MRW form with Deliver to set to MRW point: a search field over every MRW point, and the points nearest to Rua do Souto 12 in Braga, from the Braga MRW office under 1 km away to points 10 to 24 km away.
The checkout's shipping methods with Pick up at an MRW point, 3,90 €, chosen, and below them the list of MRW points nearest to the customer, with a search field.
The Transmit to MRW form for a shipment with free shipping: Transmit as set to MRW Urgente 19, and Deliver to set to the customer address in Coimbra, with MRW point as the other choice.
An MRW shipping method's settings: SAGEC service Urgente 19 Expedición, Deliver to set to Customer address rather than MRW point, rate label MRW, next working day by 19:00, rate amount 4,90 EUR, and the tracking URL pattern.

Commerce MRW connects a Drupal Commerce store to MRW, the parcel carrier, for deliveries in Spain, Portugal, Andorra and Gibraltar, through MRW's SAGEC web service. Staff create the MRW shipment from the order, download its label and cancel it from the same screen, without typing the order into MRW's systems, and the MRW shipment number becomes the shipment's tracking code. A parcel can also go to an MRW point, picked by staff or, where the shop allows it, by the customer at checkout.

Features

  • 📦 Shipments transmitted from the order. Transmit to MRW, in the shipment's operations on the order's Shipments tab, creates the shipment in MRW with the delivery address, the order number as reference and the shipment's weight, with postal codes in the format MRW expects for each country. The MRW shipment number is stored as the tracking code, and any warning MRW returns is shown to whoever transmitted.
  • 📍 Delivery to MRW points. MRW can deliver to one of its points, a partner shop or an MRW office, where the customer collects the parcel. Staff pick the point when transmitting, from the points nearest to the shipping address or by searching every point in the country, and a shop can let customers pick one at checkout through an MRW method that delivers to a point, with home delivery still preselected. The point shows on the shipment, the order and the receipt, and in email tokens.
  • 🏷️ Labels on demand, and cancellation. MRW label, and a Download the MRW label (PDF) button on the shipment page, fetch the transport label from MRW each time; no label is stored on the site. Cancel MRW shipment cancels it in MRW and clears the tracking code.
  • ⚙️ One shipping method per MRW service. Each MRW shipping method has its SAGEC service (Urgente 19, Ecommerce and the rest of SAGEC's list), the flat rate customers see at checkout, the pattern of its public tracking link, and its own credentials for MRW's test and production environments, with a test mode for the first.
  • ⚙️ Free shipping, shipped with MRW. Shipments whose method is not MRW, such as free shipping, can be made eligible for transmission. The transmit form then asks which MRW method's credentials and service to use and records the choice on the shipment, and the method the customer chose stays as it was.
  • 🔌 Returns, exchanges and extra fields from site code. An event lets site code change the request before it goes to MRW: have MRW collect a return at the customer's address and bring it to the store, deliver and collect in the same visit for an exchange, or fill in the consignee's tax number, phone, contact and delivery notes.
  • 🔌 Shipment tracking for site code. A service queries MRW's tracking web service by shipment number, by order number or by parcel, and returns the last status or the whole history, so a site can act on a delivered parcel in its own workflow.

 the message with MRW shipment number 04700F004218, the same number as the shipment's tracking link, and its operations open on MRW label and Cancel MRW shipment.

Quick start

composer require drupal/commerce_mrw
drush en commerce_mrw
  1. At Commerce > Configuration > Shipping > Shipping methods, click Add shipping method, give it a Name and pick MRW as the Plugin.
  2. Leave Test mode (PRE environment) ticked and fill in the Franchise code, the Client code, the PRE username and the PRE password your MRW franchise gave you. Choose the SAGEC service, set the Rate label and the Rate amount, and save.
  3. On an order shipped with that method, open the Shipments tab, choose Transmit to MRW in the shipment's operations, and confirm.
  4. The shipment now has the MRW shipment number as its tracking code, and its operations offer MRW label and Cancel MRW shipment.

 a search field over every MRW point, and the points nearest to Rua do Souto 12 in Braga, from the Braga MRW office under 1 km away to points 10 to 24 km away.

When a customer asks for a point, the person transmitting picks it: the nearest points are listed, and the search finds any point in the country.

The checkout's shipping methods with Pick up at an MRW point, 3,90 €, chosen, and below them the list of MRW points nearest to the customer, with a search field.

At checkout, the list of points appears once the customer chooses the point rate.

 Transmit as set to MRW Urgente 19, and Deliver to set to the customer address in Coimbra, with MRW point as the other choice.

A free shipping order goes out with the credentials and the service of the MRW Urgente 19 method, once Free shipping is eligible at Commerce > Configuration > Shipping > MRW.

00, rate amount 4,90 EUR, and the tracking URL pattern.

The SAGEC service, home or point delivery, the rate and the tracking link of one MRW shipping method.

Good to know

  • SAGEC has no rate quotation, so an MRW method charges the flat amount set on it. For several services or prices, create one method each.
  • MRW methods offer a rate only for delivery addresses in Spain, Portugal, Andorra and Gibraltar.
  • Each shipment goes to MRW as one parcel, with its weight rounded up to whole kilograms, at least 1.
  • What goes to MRW: the delivery address and the name on the shipping profile, the order number, the date, the service, the weight, and the code of the MRW point when there is one. A phone number, a tax number or an email address is sent only when site code adds it through the event.
  • The MRW points come from a copy of MRW's list kept on the site, one for MRW's test environment and one for production, refreshed daily by cron and from the settings page. Picking a point makes no call to MRW.
  • MRW delivers to the address when it does not know a point code, without an error, so the transmit form checks every point against that copy, and against the shipping country, before sending it.
  • The tracking service is separate from SAGEC and your MRW franchise has to enable it. The module ships the client and no polling, screen or change to shipment states: what a delivered parcel means is the site's decision.
  • The default tracking link points at MRW's Spanish tracking page; change the pattern on each method for another market.

Additional requirements

  • Drupal 10.3 or later, or Drupal 11.
  • Commerce Shipping 3.
  • SAGEC access from your MRW franchise: a franchise code, a client code, an optional department code, and a username and password for the PRE (test) and PRO (production) environments.

Recommended modules/libraries

Community documentation

  • README: the back office workflow, delivery to MRW points, return pickups and exchanges with code examples, and the tracking client.

Supporting this module

Developed and maintained by Bloomidea. Bloomidea offers support and custom development for this module.

Supporting organizations: 
Development and maintenance

Project information

Releases