定制 remp/crm-print-module 二次开发

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

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

remp/crm-print-module

Composer 安装命令:

composer require remp/crm-print-module

包简介

CRM Print Module

README 文档

README

The purpose of Print module is to give you ability to generate exports of users who should receive print version of your newspaper/magazine, keep track of which issues the user got and give you ability to create your own module on top of Print module to integrate with your print delivery provider.

Installing module

We recommend using Composer for installation and update management.

composer require remp/crm-print-module

Enabling module

Add installed extension to your app/config/config.neon file.

extensions:
	- Crm\PrintModule\DI\PrintModuleExtension

Run service commands to generate CRM internals:

php bin/command.php phinx:migrate
php bin/command.php user:generate_access
php bin/command.php api:generate_access
php bin/command.php application:seed

Configuration

Directory

Default directory for exports, is APP_ROOT/content/export. Directory is created automatically with first upload.

You can use other buckets for uploads, but you need to define them in your config file app/config/config.neon:

services:	
	# ...
	# fileManager extension - example uploads
	exampleExportsAdapter: League\Flysystem\Local\LocalFilesystemAdapter('%appDir%/../content/examples_exports', null)
	exampleExportsFileSystem: League\Flysystem\Filesystem(@exampleExportsAdapter)

	applicationMountManager:
		setup:
			- mountFilesystem('exampleExports', @exampleExportsFileSystem)

Using print module

Frontend

Print module adds print address type. This address type should be use for deliveries of your newspaper/magazines.

Module also adds new content access to the CRM called print. You can add this content access to selected subscription types and let your customers buy them. If user buys subscription with access to print, CRM will ask user to enter delivery (print) address after successful payment.

Success page print address

If for some reason user doesn't enter the address, she's reminded by notification to enter the missing address on every page of customer zone. Administrators are reminded by the list of all people with active print subscription with missing print address by widget in CRM admin.

Enter address widget

You can always replace this widget with your own implementation by overriding the default widget in your custom module:

public function registerLazyWidgets(\Crm\ApplicationModule\Widget\LazyWidgetManagerInterface $lazyWidgetManager)
{
    // ...
    $lazyWidgetManager->overrideWidget(
        'frontend.layout.top',
        \Crm\PrintModule\Components\EnterAddressWidget::class,
        \Crm\FooModule\Components\EnterAddressWidget::class,
        100
    );
    // ...
}

Backend

As every publisher works with different delivery partner which requires data in different format, we only prepared demo command to generate CSV with list of print subscribers that should receive a print edition.

It's recommended for you to create your own implementation of export command in your custom module based on this one altered to match your needs.

The command uses two main concepts:

  • DataSource. This should return query containing all the subscriptions that could be used to generate CSV. In our demo data source we select all print subscriptions.
  • View. This is component handling how the subscriptions are actually displayed (exported) into the CSV file. Here you can define what columns the export should have and the actual values with possibility to format them based on your needs. See demo view to see how the CSV is created.

Command is defined in a way that export is generated two working days before the delivery - this is industry standard in our area. If your flow differs, feel free to alter this in your implementation.

You can also see, that command uses print_daily as a key for export criteria. This is to differentiate between multiple exports as one publisher might have daily delivery of one newspaper and monthly delivery of some magazine. This key is identifying which export is being used. You should therefore have different generation commands for different exports.

The exporting engine is automatically handling print status for every print subscriber. Each generation it flags every customer to give you information whether it's a:

  • new subscriber - she'll get the first edition
  • recurrent subscriber - she was receiving the newspaper before (e.g. the day before) and she should receive them also today
  • removed subscriber - she was receiving the newspaper before (e.g. the day before) and she is not supposed to get the newspaper today.

These flags help to some delivery partners which don't need full list of subscribers every day but they require incremental changes of people who should be added to the list / removed from the list.

Once generated, you can see and download the export in the CRM admin (/print/print-subscriptions-admin/:

Print admin

Components

EnterAddressWidget

Simple widget showing warning with missing address.

alt text

Source code

How to use

PaymentSuccessPrintWidget

Widget on subscription success page with address form.

alt text

Source code

How to use

RequestNotification

Address change request list widget.

alt text

Source code

How to use

UserChangeAddressRequests

Listing witget with address change requests.

alt text

Source code

How to use

UserPrintExport

User detail print export lising widget.

alt text

Source code

How to use

remp/crm-print-module 适用场景与选型建议

remp/crm-print-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.9k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 07 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 remp/crm-print-module 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 7
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-31