Feature: Adding Checkout Services and Events
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Core\Checkout\Events;
|
||||
|
||||
use Lunar\Base\Addressable;
|
||||
use Lunar\Models\Cart;
|
||||
|
||||
/**
|
||||
* Dispatched by CheckoutService::setShippingAddress() — Lunar itself
|
||||
* dispatches no checkout-lifecycle events at all (same gap CartService's
|
||||
* events fill for cart mutations; see docs/cart.md). Feeds
|
||||
* abandoned-checkout stage tracking / conversion-funnel analytics (neither
|
||||
* built yet — see docs/checkout.md), which is why $address is carried
|
||||
* directly rather than requiring a listener to re-read it off the cart.
|
||||
*/
|
||||
class ShippingAddressSet
|
||||
{
|
||||
public function __construct(
|
||||
public readonly Cart $cart,
|
||||
public readonly array|Addressable $address,
|
||||
) {}
|
||||
}
|
||||
Reference in New Issue
Block a user