thoughtco/lunar-cart-abandonment
Composer 安装命令:
composer require thoughtco/lunar-cart-abandonment
包简介
Lunar Cart Abandonment Addon
README 文档
README
An simple add-on for Lunar that triggers jobs based on how long a cart has been inactive for.
Installation
First, require as a composer dependency:
composer require thoughtco/lunar-cart-abandonment
Then publish the config file to allow you to define triggers and jobs.
php artisan vendor:publish --tag=lunar-cart-abandonment-config
Usage
You define triggers by adding new arrays to the triggers key in the config file, eg:
[
'interval' => 5, // minutes
'job' => \App\Jobs\CartAbandonment::class,
'queue' => 'default', // optional
'queue_connection' => 'redis', // optional
'config' => [], // this will be passed to your job along with the cart
],
alternatively you can define a callable that returns an array of triggers.
'triggers' => [\App\Classes\CartAbandonmentTriggers::class, 'handle']
class CartAbandonmentTriggers { public static function handle() { return [ [ 'interval' => 5, // minutes 'job' => \App\Jobs\CartAbandonment::class, 'queue' => 'default', // optional 'queue_connection' => 'redis', // optional 'config' => [], // this will be passed to your job along with the cart ] ]; }
Your job should expect 2 arguments, $cart and $config.
If you don't want the scheduled task to run every 5 minutes, you can change the frequency by using the schedule_interval config setting.
Support
This is a free addon so support is provided on an as-we-have-capacity basis. If you have a feature request or experience a bug, please open a GitHub Issue.
Only the latest version of this addon is supported. If you open a bug report using an old version, your issue will be closed.
thoughtco/lunar-cart-abandonment 适用场景与选型建议
thoughtco/lunar-cart-abandonment 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.12k 次下载、GitHub Stars 达 9, 最近一次更新时间为 2023 年 10 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 thoughtco/lunar-cart-abandonment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 thoughtco/lunar-cart-abandonment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.12k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-11