artlounge/magento2-bento 问题修复 & 功能扩展

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

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

artlounge/magento2-bento

最新稳定版本:v1.3.1

Composer 安装命令:

composer require artlounge/magento2-bento

包简介

Magento 2 integration with Bento email marketing platform via async event queues

README 文档

README

Connect your Magento 2 store with Bento email marketing using reliable, non-blocking async event queues.

What It Does

This package automatically sends customer activity from your Magento store to Bento for email marketing automation. Events are processed through RabbitMQ queues so they never slow down your store.

Server-Side Events

Magento Event Bento Event Trigger
Order Placed $purchase Customer completes checkout
Order Shipped $OrderShipped Shipment created
Order Refunded $OrderRefunded Credit memo created
Customer Registered $Subscriber New account created
Newsletter Subscribe $subscribe Email subscribed
Newsletter Unsubscribe $unsubscribe Email unsubscribed
Abandoned Cart $cart_abandoned Cart idle for configured time

Client-Side Events

Event Bento Event Trigger
Product View $view Customer views product page
Add to Cart $addToCart Customer adds item to cart
Checkout Started $checkoutStarted Customer enters checkout
Purchase (fallback) $purchase Success page (deduplicated with server-side)

Requirements

  • PHP 8.1+
  • Magento 2.4.4+
  • RabbitMQ 3.8+ (or Magento database queue fallback)
  • Aligent Async Events ^3.0
  • Bento account with Site UUID, Publishable Key, and Secret Key

Installation

composer require artlounge/magento2-bento
bin/magento module:enable ArtLounge_BentoCore ArtLounge_BentoEvents ArtLounge_BentoTracking
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

Configuration

Navigate to Stores > Configuration > Art Lounge > Bento Integration in Magento Admin.

Required Settings

Setting Path Description
Enable General > Enable Master on/off switch
Site UUID General > Site UUID Your Bento site identifier
Publishable Key General > Publishable Key Client-side API key
Secret Key General > Secret Key Server-side API key (stored encrypted)

Optional Settings

  • Orders — Toggle tracking for placed, shipped, cancelled, refunded orders. Configure tax inclusion and currency multiplier.
  • Customers — Toggle tracking for customer creation/updates. Add default tags.
  • Newsletter — Toggle subscribe/unsubscribe tracking.
  • Abandoned Cart — Set delay (minutes), minimum cart value, and whether email is required.

Test Your Connection

After entering your API keys, click Test Connection in the admin config to verify your credentials.

Queue Consumers

Start the async event consumers (production environments should use Supervisor):

bin/magento queue:consumers:start event.trigger.consumer
bin/magento queue:consumers:start event.retry.consumer

Check queue status:

rabbitmqctl list_queues name messages consumers

CLI Commands

bin/magento bento:test                     # Test API connection
bin/magento bento:status                   # Show config and queue status
bin/magento bento:abandoned-cart:process    # Manually process pending carts
bin/magento bento:abandoned-cart:cleanup    # Remove old schedule entries
bin/magento bento:deadletter:replay        # Replay failed events

Reliability Features

  • Outbox fallback — If RabbitMQ is unreachable, events are stored in a database outbox and retried automatically when the broker recovers.
  • Dead-letter replay — Events that fail after max retries can be replayed via CLI or monitored by cron.
  • Smart retry prevention — Permanent failures (400, 401, 403) are not retried; transient failures (429, 5xx, network errors) are retried with exponential backoff.
  • Abandoned cart detection — Configurable delay, minimum value, and HMAC-signed recovery links.
  • Event deduplication — All events include unique keys to prevent duplicate processing.

Varnish / Full Page Cache Compatibility

All client-side tracking is Varnish-safe. Templates render no user-specific data in HTML — all customer identification happens via Magento's private content AJAX system (customerData).

Architecture

See docs/architecture.md for a detailed walkthrough of how the three modules work together, the event flow, retry system, and design decisions.

Contributing

See CONTRIBUTING.md for development setup, running tests, and pull request guidelines.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固