Menu
Guide
Reference
Cookbook
Try
Buy
Search
Reference
Options
Config options
Hooks
Translations
Site methods
Field methods
Classes
Cart
ListItem
ListItems
Logger
Merx
OrderPage
PaymentDetails
Price
PricingRule
PricingRules
ProductList
ProductPage
Tax
TaxRule
TaxRules
API Reference
Models
Routes
Panel blueprints
Fields
Layouts
Pages
Tabs
Releases
Merx 2
new Cart()
Constructor
$cart->add()
Adds item to cart.
$cart->currency()
Gets the currency of this List
$cart->delete()
Removes the cart from the visitor’s session.
$cart->filterByType()
Filters items by given type
$cart->getStripePaymentIntent()
Get Stripe’s PaymentIntent.
$cart->isFromPrice()
Determines if the list contains a ListItem with a null total price.
$cart->isOrderable()
Checks whether the list can be ordered.
$cart->payPalPurchaseUnits()
Cart as PayPal purchase unit
$cart->quantity()
Quantity of items of given type
$cart->reduceStock()
Lowers the stock of every product in the list by the quantity ordered
$cart->remove()
Removes item from Cart by key
$cart->taxRates()
List of Tax items
$cart->toYaml()
Used to store Cart in OrderPage
$cart->total()
Total price of the ListItems
$cart->updateItem()
Updates existing item.
$cart->validateStock()
Makes sure no product is in the list more often than its stock allows
$cart->delete()
Removes the cart from the visitor’s session.
src/Cart.php#L108
$cart->delete(): void
Return type
void
Parent class
Wagnerwagner\Merx\Cart