定制 marellocommerce/marello-orocommerce-bridge 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

marellocommerce/marello-orocommerce-bridge

Composer 安装命令:

composer require marellocommerce/marello-orocommerce-bridge

包简介

Marello package, integrates Products, Inventory and Orders with OroCommerce

README 文档

README

Package that contains bundles related to the integration between Marello and OroCommerce Marello (Enterprise) contains the possibility to integrate with the B2B Commerce platform OroCommerce. This integration allows business owners to use their OroCommerce online store as a SalesChannel in Marello (Enterprise).

Requirements

Marello OroCommerce Bridge requires Marello (EE) 2.1.x or above and OroCommerce (EE) 3.1.x or above installed in order to function correctly.

Terminology

Term Explanation
Single Instance Single instance refers to the setup in which Marello and OroCommerce are installed together on the same server using the same code base and database
Multiple Instances Multiple instances referes to the setup in which Marello and OroCommerce are installed on separate servers where they are not sharing the same code base and database

General information

The integration between Marello (Enterprise) and OroCommerce (Enterprise) can be setup in either a single (Marello and OroCommerce installed together) or multiple instances (Marello and OroCommerce are installed on separate servers). Both setups are currently supported. The integration is using the OroCommerce API in order to perform synchronisations between the two systems which allows us to use both setups with a single solution. 

The integration will allow business owners to synchronise:

  • Orders;
  • Products;
  • Product Images;
  • Product Prices;
  • Inventory;
  • and Tax related entities such as TaxRules, TaxCodes and Tax Jurisdictions

Configuration

In order to configure the integration, make sure you have setup the applications correctly. Please advice with your implementation partner to verify your setup, or see the technical overview below.

Configuration prerequisites

Above prerequisites should be met before configuring your integration in Marello.

Integration Configuration

Using Composer

If you don't have Composer yet, download it and follow the instructions on https://getcomposer.org/ or just run the following command:

    curl -s https://getcomposer.org/installer | php

If you're using Composer to install the Marello OroCommerce Api Bridge, you will need to add the package as a dependency in the composer.json. In order to add the dependency the following command should be executed from the (OroCommerce/Marello)installation directory:

    php composer.phar require marellocommerce/marello-orocommerce-api-bridge

After adding the Marello OroCommerce Api Bridge as an new dependency, you should update in order to get the latest versions and updating the composer.lock file

    php composer.phar update

The configuration for the integration should be done in the Marello Application. If the setup is done with multiple instances, this is especially important! The integration can be created on the 'Integration' page and can be found in Marello in:

  • System → Integrations → Manage Integrations → Create Integration.

The page will show you the following information for you to configure the Integration:

Integration Configuration

Configuration Option Explanation Example
Name Name of the Integration and SalesChannel* OroCommerce Channel
URL URL where the integration can connect to. This should be the admin URL of your OroCommerce application http://example.com/admin
Username Username of the User which has API access to the OroCommerce application admin
Api Key Generated API Key for the User in the OroCommerce application  2443a16dd3110b73b8cd97da26c6d4cb4c1124df
Currency Currency which is used in the OroCommerce application**. The currency value is also being used for the creation of a new SalesChannel based of the integration configuration. EUR, USD
Inventory Threshold The value that defines the limit of inventory after which this product can not be ordered 10
Low Inventory Threshold The minimum inventory level defined for the product. Reaching the defined level will trigger a warning message to the buyer in the front store. 5
Backorder Backorder flag defines whether a product may be ordered while not in stock or when the inventory is low. When such product is ordered, the shipment will happen once the product is restocked. Yes/No
Product Unit Product Unit used to create a Product in OroCommerce. These values will be the available units from the OroCommerce application. each, items
Customer Tax Code Tax Code to be used for customers. Values will be the available Customer Tax Codes from the OroCommerce application. NON_EXEMPT
Price List Price List used to assign a newly created product to. Price List values will be the available price lists from OroCommerce application Default Price List
Product Family Product Family used to create new products in OroCommerce. Product Family values will be the available Product Families from OroCommerce application Default

*The configured name of the integration will be used to create a SalesChannel with the same name and code. In order to synchronise to be able to only synchronise selected products to the OroCommerce SalesChannel, products need to be assigned to the OroCommerce SalesChannel and therefore a new SalesChannel is created with the same name and code as the integration.

**Only a single currency is supported per integration. The value is also being used for the creation of the SalesChannel.

A few notes about the integration and events happening.
  • After the integration is saved, a new SalesChannel will be created based on this integration;
  • Every product which will be assigned to this SalesChannel will be synchronised to OroCommerce (only if the balanced inventory is greater than 0)
  • When a TaxRule,TaxRate,TaxCode or TaxJurisdiction is created, updated or deleted products assigned to this SalesChannel, will be trigger synchronisation of all products assigned to this SalesChannel (so it is recommended to fill correct tax information before assigning products to SalesChannel based on the integration);
  • Order import will be done only, for products which exists on Marello side, orders with products that do not exist in Marello will be skipped;
  • Order status will be exported to OroCommerce when the order is going through the workflow in Marello.

Technical overview

This part of the documentation will cover the setup of both a single instance and multiple instance setup of the integration with OroCommerce. It will describe the (required) components needed in order to make the single and or multiple instance setup work correctly.

Components

In order to create a successful integration between Marello and OroCommerce, there are at least two additional components necessary next to Marello and OroCommerce to create the Integration. 

MarelloOroCommerce Bridge and Bundle

The MarelloOroCommerce Bridge and Bundle will provide you with the integration and services need in order to create an integration. This package does not include the extension of the OroCommerce API and or disabling of the Order notification emails.

This package will provide you with the code in order to create the integration, cleanup and clarification of the Admin Navigation and clarification of the widgets in the Admin Dashboard.

MarelloOroCommerce Api Bridge

This Bridge will provide you with the necessary code and configuration to extend the current OroCommerce (1.5.x)  API endpoints in order to facilitate Tax related entity creation, updating the Order and Payment status of entities in OroCommerce. Another feature this api bridge will provide is the disabling of the Order notification emails being send through OroCommerce since this responsibility will be handled by Marello. Without this component the Integration will not work properly and will leave you in disappointment.

Single Instance Setup

A single instance setup would be a setup where all the required components and applications are installed together on the same server while sharing the code base and database. Even though they are being installed together, the integration still operates through API calls on OroCommerce, meaning the url (admin url) needed to configure will be the same as where the application is actually running on. The diagram below shows a setup of the Marello-OroCommerce integration as a single instance setup.

Marello-OroCommerce Single Instance overview

The single instance setup will share a repository and we've configured a repository to do exact that. The public repository will only feature the Community Editions of Marello and OroCommerce without the CRM. However it is possible to install OroCRM Community edition with the setup, but does require additional dependencies. The repository can be found at https://github.com/marellocommerce/marello-orocommerce.

Multiple Instance Setup

If Marello and OroCommerce are not installed together in a single application; we are talking about a multi instance setup where the applications are not sharing the same code base and database. The integration can coop with a multi instance setup since the integration is communicating via the API of OroCommerce, whether it's installed together or apart from each other. The multi instance setup will look something like the diagram below from a high level perspective. The respective components needed for the integration have been drawn in the instance where they should be installed.

Marello-OroCommerce Multi Instance overview

The diagram above shows us that the MarelloOroCommerce Bridge and Bundle compontent are being installed to the Marello Application as this enables the business owner to configure an integration with OroCommerce. It also shows that the MarelloOroCommerce API Bridge component should be installed in the OroCommerce Application as this component will extend the current OroCommerce API and disabling the Order notification emails in the OroCommerce application.

The multi instance setup will not have a pre-configured repository since it depends on the repositories at hand or configuration handled by the (technical) implementation partner.

marellocommerce/marello-orocommerce-bridge 适用场景与选型建议

marellocommerce/marello-orocommerce-bridge 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 877 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 07 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 marellocommerce/marello-orocommerce-bridge 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 marellocommerce/marello-orocommerce-bridge 我们能提供哪些服务?
定制开发 / 二次开发

基于 marellocommerce/marello-orocommerce-bridge 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 877
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 12
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 8
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2018-07-19