Mirakl WooCommerce Connector Plugin

This Plugin you can download it for free from my Github repo: Mirakl WooCommerce Connector Plugin.

Streamlining Your Operations

Real-Time Order Import:

  • Our system ensures seamless order import.
  • New Woocommerce orders are created automatically as soon as a corresponding order with the ‘accepted’ state appears in Mirakl.

Customer Management:

  • New Customers: For first-time Mirakl customers, our Connector generates a customer profile in Woocommerce and links it to their order.
  • Existing Customers: If the customer already exists in Woocommerce (based on their email address), our system associates the order with their existing profile.

Product Handling:

  • New Products: When an order includes a product (SKU) not present in Woocommerce, our Connector takes care of creating the product within Woocommerce before processing the order.
  • Existing Products: If the product already exists in Woocommerce (identified by product reference or SKU), our system utilizes the existing product data for order fulfillment.

Order Status Sync:

  • Effortless Order Tracking: Any changes made to Woocommerce order statuses are promptly reflected in the corresponding Mirakl order.
  • Streamlined Shipping: If you provide tracking details (tracking number, tracking URL, carrier name) in Woocommerce, these details are also synchronized with the Mirakl order.

Inventory Management:

  • Inventory Updates: Modifications to product stock levels in Woocommerce are instantly mirrored in your Mirakl inventory, ensuring accurate and up-to-date information.

Enjoy a smoother and more efficient operation with our automated processes.

Note: Some features of the above-mentioned, you will not find available but they will be available on 01.02.2024

Requirements:

Plugin Name: Mirakl WooCommerce Connector

Description: Connect Mirakl with WooCommerce.

Version: 1.0.0

Author: Mohamed Ayoub Jabane & Abdellatif Bouziane

Tested up to: 8.4

WC requires at least: 3.0

WC tested up to: 8.4

Requires at least: 5.6


How To Use

Download the plugin zip file and upload it to your Woocommerce shop.

Activate it and navigate to > API Credentials

Insert your mirakl API url 'https://xxx-prod.mirakl.net'

Insert your API Key 'xxxxx'

Yeah ╰(°▽°)╯ you are ready to start.

FYI: Regarding the tracking code confirmations being sent to Mirakl, unfortunately, aren’t set but we can customize it for DHL in the next release.


Activation Hook

When activated, this plugin creates two database tables: mirakl_settings and mirakl_sku_mappings for configuration settings and SKU mappings.


Admin Menu

The plugin adds various admin menu items:

  • Mirakl Connector: Main menu item.
  • Channels Orders Import: Submenu for importing Mirakl orders.
  • SKU Mapping: Submenu for managing SKU mappings.
  • Stock Management: Submenu for stock management.
  • API Credentials: Submenu for configuring Mirakl API credentials.
  • Import Orders Settings: Submenu for configuring custom cron job settings.

Channels Orders Import Page

This page allows users to trigger the retrieval of Mirakl orders by clicking the “Get Mirakl Orders” button.


SKU Mapping Page

  • Users can manage SKU mappings between WooCommerce and Mirakl.
  • Features a two-column layout for editing mappings and adding new ones.
  • Users can edit existing mappings and add new ones with validation and saving handled in the code.
  • Existing mappings are displayed in a table.

Stock Management Page

A page for potential future stock management features.


API Credentials Page

  • Users can configure Mirakl API settings, including the API endpoint and API key.
  • The settings are saved for future retrieval.

Custom Cron Settings Page

  • Allows users to configure custom cron job settings for Mirakl order retrieval.
  • The selected cron time is saved for scheduling.

Custom Functions

Various custom functions for database operations, API interactions, and WooCommerce order creation. The plugin fetches Mirakl orders, maps them to WooCommerce products using SKU mappings, and creates orders in WooCommerce. Functions for checking if Mirakl order IDs exist in WooCommerce orders.


Hooks and Actions

Extensive use of WordPress hooks and actions to execute functions at different points during the WordPress lifecycle.

This code serves as the foundation for integrating a WooCommerce store with the Mirakl marketplace, enabling product and order synchronization. Additional development and testing may be required for your specific environment.