This is the checkout module for Vanilo.
composer require vanilo/checkout
php artisan migrate
It has:
- Cart (
CheckoutSubject
) - Billing information (
BillingSubject
) - Payment method (TBD)
- Shipping information (if cart needs shipping; address, contact)
- Shipping method (TBD)
- User (optional)
- Custom Data (notes, etc)
- State
Attributes:
- requires login?
$checkout->cart; // CheckoutSubject (vanilo/contracts) getter/setter
$checkout->billingSubject; // BillingSubject
$checkout->shippingAddress; // Address
$checkout->user; // laravel user | null
$checkout->shippingMethod; // ?? name, fee => shipping module?
$checkout->paymentMethod; // ?? name, gw => payment module?
$checkout->state; // CheckoutState
\Vanilo\Contracts\BillingSubject
// Set custom attribute
Checkout::setCustomAttribute('gift', 'Unisex T-Shirt L');
// Retrieve custom attribute
echo Checkout::getCustomAttribute('gift');
// "Unisex T-Shirt L"
// Retrieve all custom attributes at once
Checkout::getCustomAttributes();
// array(2)
// 'gift' => 'Unisex T-Shirt L'
// 'gdpr_accepted' => true