mailcampaigns/shopware-6-abandoned-cart-plugin
Composer 安装命令:
composer require mailcampaigns/shopware-6-abandoned-cart-plugin
包简介
A Shopware 6 plugin for "abandoned" carts.
README 文档
README
This Shopware 6 plugin adds an /abandoned-cart API endpoint that allows you to retrieve shopping carts that your customers have left behind.
ℹ️ Note: By default, Shopware stores shopping carts in the SQL database. For high-throughput scenarios, Shopware supports storing carts in Redis instead of SQL. If your Shopware installation is configured to use Redis for cart storage, this plugin may not be compatible, as it expects carts to be stored in the database. Learn more: Shopware Cart Storage
After a configured number of seconds, a cart can be considered abandoned.
It only returns carts of active known customers that have not been converted to an order yet.
Use this data to send automated cart recovery reminders to increase your conversions.
🎯 Features
- 🔗 Adds
/abandoned-cartAPI endpoint - 👤 Only returns known, non-order customers
- ⏱️ Configurable timeout in seconds (default: 3600)
- 🛠️ Compatible with scheduled tasks & message queue
- ✅ Supports Shopware 6.4 → 6.7
🛍️ Supported Shopware Versions
| Shopware Version | Plugin Version | Download |
|---|---|---|
| 6.4 | 1.7.1 | 🔗 View Release |
| 6.5, 6.6, 6.7 | 3.0.10 | 🔗 View Release |
🚀 Getting Started
You can either upload the .zip manually or install via Composer.
🔌 Composer Installation
composer require mailcampaigns/shopware-6-abandoned-cart-plugin bin/console plugin:refresh
🔄 Activate Plugin
Option 1 (Admin panel):
Go to Extensions > My extensions and activate the plugin.
Option 2 (CLI):
bin/console plugin:install --activate MailCampaignsAbandonedCart bin/console cache:clear
🔧 Configuration
After activating, configure the cart timeout setting:
"Number of seconds after which a cart is considered abandoned" (default:
3600)
Make sure this timeout is less than than Shopware's own cart expiration setting:
Time in minutes for a customer to finalize a transaction
Make sure to give the API user the necessary permissions to access the /abandoned-cart endpoint.
abandoned_cart:readpermission to read abandoned carts
🧠 Abandoned carts are generated using scheduled tasks and depend on the message queue.
⚙️ Example API Request
🔍 Retrieve Abandoned Carts
GET /api/abandoned-cart
Optional query parameters:
limit(default: 10)page(default: 1)
GET /api/abandoned-cart?limit=5&page=1
Example response:
{
"data": [
{
"id": "0195cd19f28e7327a24222075a312f39",
"type": "abandoned_cart",
"attributes": {
"cartToken": "aeyBUILGpDFdJQS77WMkQVn6wXgOHgC6",
"price": 40.0,
"lineItems": [
{
"id": "3ac014f329884b57a2cce5a29f34779c",
"good": true,
"type": "product",
"label": "Main product, free shipping with highlighting",
"quantity": 2,
...
}
],
"customerId": "0195cd14000773d7b6697f79bae4283d",
"createdAt": "2025-03-25T11:39:44.661+00:00",
"updatedAt": "2025-03-25T15:28:34.982+00:00",
...
},
...
}
],
...
}
🔍 Retrieve a Specific Abandoned Cart
You can retrieve details of a specific abandoned cart using its unique {id}.
Endpoint:
GET /api/abandoned-cart/{id}
Method:
- GET: Retrieve details of a specific abandoned cart.
📡 Events
The plugin dispatches several events that you can listen to in your custom code:
AfterCartMarkedAsAbandonedEvent
Dispatched when a cart is marked as abandoned. Contains:
AbandonedCartEntity: Newly created abandoned cart entityarray: Original Shopware cart dataContext: Shopware context
AfterAbandonedCartUpdatedEvent
Dispatched when an abandoned cart is updated. Contains:
AbandonedCartEntity: Updated abandoned cart entityarray: Updated Shopware cart dataContext: Shopware context
🤝 Contributing
Pull requests, issues, and feedback are welcome.
For support, contact us at support@mailcampaigns.nl
🔗 More
Check all releases:
👉 https://github.com/mailcampaigns/shopware-6-abandoned-cart-plugin/releases
Check out this handy database seeder for seeding test customers and data in your development environment:
👉 https://github.com/m-a-x-s-e-e-l-i-g/shopware-6-cart-seeder
Check out Dockware for easily setting up a local Shopware environment:
👉 https://docs.dockware.io/use-dockware/first-run
mailcampaigns/shopware-6-abandoned-cart-plugin 适用场景与选型建议
mailcampaigns/shopware-6-abandoned-cart-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.27k 次下载、GitHub Stars 达 3, 最近一次更新时间为 2021 年 09 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mailcampaigns/shopware-6-abandoned-cart-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mailcampaigns/shopware-6-abandoned-cart-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 14
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-03