Vanilo 4.0 has been released with Laravel 11 support, new checkout, order and adjustment features.
Beginning with v4.0, Vanilo supports Laravel 10 and 11, and PHP 8.2 and 8.3.
Added the generic Taxable
interface, and the Foundation's CartItem
, Product
and MasterProductVariant
are now "taxables".
Added the extendable TaxEngine
(facade) that can resolve tax rates from taxables, billing/shipping addresses, a place
for various country-specific taxation drivers.
Added the DefaultTaxCalculator which - calculates simply by rate. The DeductiveTaxCalculator class deducts the amount from
gross prices.
Added the CalculateTaxes
listener to cart update and shipping address change events so that configured taxes are applied
as adjustments.
Added Cart Item configuration support. Different configurations constitute separate cart items even when the underlying
product is the same. The configuration can be passed to the Cart::addItem()
method.
The configurations are persisted to the order items table accordingly.
Each order record can have a separate currency. Existing orders without explicit currency are considered as having the globally configured default currency
Properties now can be hidden, which means they can be hidden from the storefront and filters, but can be still used for internal logic-related considerations.
Tax Category and Rate editing has been added to the Admin package
Additionally, the tax category can be assigned to products on their edit forms.
Channel assignments can be edited on the products, shipping methods and payment methods pages.
When assigning an entry (product, payment/shipping method) to a channel, it means that it will only be available in the given channels.
The channel form now contains the domain
, currency
, shipping and billing zone fields.
Setting billing/shipping zones for a channel can be used to geographically restrict customers and shipping destinations
per channel.
The geographic zone of a payment method can now be edited on the admin. This can be used to dynamically show or hide certain payment methods based on the billing address at the checkout.
Beginning with v4.0, it is possible to define a "backorder" behavior on a per-product basis. It means that if the product is out of stock, orders can be still accepted either in a limited (X additional units) or unlimited manner.
ProductSearch
class can now limit and sort results, and filter by slug, channel(s).withImages
and withChannels
methods to the product search class (eager loads media)payment_method_id
is now stored with orders. Earlier it was obtained by the current payment, but it could be ambiguous due to an order possibly having multiple payments.SimpleTaxDeduction
adjuster has been added. It can be used when to deduct taxes from gross prices.Added the channelables
table for being many-to-many polymorphic relationships with channels and arbitrary models.
Products, Master Products, Taxonomies, Payment Methods and Shipping Methods are now channel-aware.
The following new events have been added:
BillpayerChanged
(on checkout),CartUpdated
event when destroying a cart (CartDeleting
and CartDeleted
events remain)BuyableImageSpatieV7
and BuyableImageSpatieV8
traitsFor the full list of changes, including BCs, see the Vanilo 4.0 Changelog