aashan/module-link-guest-orders 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

aashan/module-link-guest-orders

Composer 安装命令:

composer require aashan/module-link-guest-orders

包简介

Links guest orders to customer accounts if there is any user account associated with the order email.

README 文档

README

Build Status

Link Guest Customer

Overview

By default, Magento 2 doesn't automatically link the guest orders as customer orders if the account with email supplied during the checkout process already exists. That is where this module comes in handy. This module automatically synchronizes the orders on the basis of order email address. You can even sync previously added orders through the admin panel.

Image Image Image

Installation

  • Composer Installation

    Inside your project root directory, run composer require aashan/module-link-guest-orders.

    Make sure to run post installation scripts.

  • Manual Installation

    This module can be installed by downloading the latest release and extracting the files under <your project root>/app/code/Aashan/LinkGuestOrder. Once the files have been extracted, run the post installation scripts.

  • Install via Git

    To install it via git, follow the following process.

    • cd <your project directory>
    • mkdir app/code/Aashan/LinkGuestOrder && cd app/code/Aashan/LinkGuestOrder
    • git init
    • git remote add origin https://github.com/aashan10/magento2-link-guest-order.git
    • git pull origin master

    Once the installation is complete, please follow post installation scripts.

  • Post Installation

    Once you have your module installed by one of the above methods, run the following commands to make sure that the module is setup correctly.

    • bin/magento setup:upgrade
    • bin/magento cache:clean

API

The module provides a simple API for auto linking the orders to their respective customers. The main API is available through Aashan\LinkGuestOrder\Helper\OrderLinkHelper helper class. It consists of a method linkOrderToCustomer which takes object of Magento\Sales\Model\Order class as the only argument.

Below is an example on using the API.

<?php 
...

use Aashan\LinkGuestOrder\Helper\OrderLinkHelper;
use Magento\Sales\Model\ResourceModel\Order\CollectionFactory;
...

public function __constructor(
	...,
	OrderLinkHelper $helper,
	CollectionFactory $factory,
	...
){
	$this->helper = $helper;
	$this->factory = $factory;
};

...
...

public function linkOrderById($orderId){
	$order = $this->factory
				->create()
				->addFieldToFilter(
					'entity_id', 
					$orderId
				)
				->getFirstItem();
	$this->helper->linkOrderToCustomer($order);
}
...

Contributing

Follow the Github docs for contribution guide given here.

aashan/module-link-guest-orders 适用场景与选型建议

aashan/module-link-guest-orders 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.87k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2020 年 10 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 aashan/module-link-guest-orders 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 5.87k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 28
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-10-15