npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

medusa-fulfillment-mondialrelay

v0.5.1

Published

An unofficial Medusa plugin for Mondial Relay shipping

Downloads

150

Readme

Medusa Fulfillment Mondial Relay Plugin by Assalas Com

Overview

medusa-fulfillment-mondialrelay is a plugin for integrating Mondial Relay shipping services with Medusa.js. This plugin enables seamless creation and management of shipments and returns via the Mondial Relay service.

Table of Contents

Installation

To install the plugin, add it to your project dependencies :


#using Yarn
yarn add medusa-fulfillment-mondialrelay

# or using npm
npm install medusa-fulfillment-mondialrelay

Configuration

To configure the plugin, you need to provide the necessary credentials and options in your Medusa project.

Create or update the medusa-config.js file in your project:

const dotenv = require("dotenv");
dotenv.config();

module.exports = {
	projectConfig: {
		// Other configurations...
	},
	plugins: [
		// Other plugins...
		{
			resolve: `medusa-fulfillment-mondialrelay`,
			options: {
				apiBaseUrl:
					process.env
						.MONDIAL_RELAY_API_BASE_URL,
				culture:
					process.env
						.MONDIAL_RELAY_CULTURE,
				login:
					process.env
						.MONDIAL_RELAY_LOGIN,
				password:
					process.env
						.MONDIAL_RELAY_PASSWORD,
				customerId:
					process.env
						.MONDIAL_RELAY_CUSTOMER_ID,
				businessAddress: {
					title: "Mr", // or "Mme"
					firstname: "John",
					lastname: "Doe",
					streetname: "Rue de la Paix",
					addressAdd2: "Apt 123",
					countryCode: "FR",
					postCode: "75002",
					city: "Paris",
					addressAdd1: "1",
					mobileNo: "0600000000",
					email: "[email protected]",
					returnLocation: "FR-12345",
				},
			},
		},
	],
};

Make sure to add the necessary environment variables to your .env file:

MONDIAL_RELAY_API_BASE_URL=https://api.mondialrelay.com
MONDIAL_RELAY_CULTURE=fr-FR
MONDIAL_RELAY_LOGIN=your_login
MONDIAL_RELAY_PASSWORD=your_password
MONDIAL_RELAY_CUSTOMER_ID=your_customer_id
  • The plugin uses the business address for the sender address in outbound/inbound shipments.

  • The plugin uses the order shipping address for the customer address in outbound and return shipments.

  • The plugin uses address_2 as the pickup point reference, e.g., FR-12345 for both business and customer to indicate the pickup point to Mondial Relay as a workaround.

  • The plugin returns :

{
	"shipment_number": "96824834",
	"shipment_label": "https://connect-sandbox.mondialrelay.com//BDTEST/etiquette/GetStickersExpeditionsAnonyme2?ens=BDTEST&expedition=96824834&lg=fr-FR&format=10x15&crc=4C56D4342BDF1F85CA6DAB0409C04666",
	"shippement_raw_content": {
		"string": "unknown"
	}
}
  • The createFulfillment method returns data that will be stored in fulfillment.data.
  • The createReturn method returns data that will be stored in return.shipping_data.

LOCKER DELIVERY

  • The plugin now supports the locker delivery feature. If the shipping address contains isLocker = true, the plugin will return the locker delivery label in the shipment data. .

New Home Delivry feature

  • The plugin now supports the new home delivery feature. The plugin will return the shipment label in the shipment data.

-You need to add type=home in the shipping option metadata created withing the mondialrelay provider.

  • If type don't equal to home the default delivry mode of pickup point will be used.

New print in store feature

  • The plugin now supports the new print in store feature. The plugin will return the pickup point reference in the shipment data. The pickup point reference can be used to print the label in the store.

  • You need to add print=in_store in the shipping option metadata created withing the mondialrelay provider.

  • If print don't equal to in_store the default A4 PDF label will be returned.

{
	"shipment_number": "96824834",
	"shipment_label": "ABCD ...", // Qr code value to be printed in store
	"pickup_point_reference": "FR-12345",
	"shippement_raw_content": {
		"string": "unknown"
	}
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

This plugin is in its early development stages. Contributions are welcome! If you encounter any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

Feel free to contact the author, Khaled Belkouche, at [email protected].


For more information about Medusa.js Fulfillment Providers, refer to the Medusa Fulfillment Provider documentatio.