Vanilo 4.2 has been released with support for promotions, coupons and PHP 8.4.
The promotion module has been added with the following features:
The total amount of promotions can be obtained from an order using the $order->promotions_total
property.
The Checkout implementations have been extended with the addCoupon()
, removeCoupon()
, hasCoupon()
, getCoupons()
,
hasAnyCoupon()
, getPromotionsAmount()
and setPromotionsAmount()
methods.
To avoid breaking changes, these methods are not part of the Checkout interface, but they will be added in v5.
The following checkout events have been added:
CouponAdded
(to checkout)CouponRemoved
(from checkout)CouponUtilized
(after a successful checkout converted to an order)PaymentMethodSelected
Added a listener to update coupon and promo usage after a CouponUtilized
event (Foundation)
PercentDiscount
adjuster classPaymentMethodSelected
event (Foundation)domain
field to the orders table$order->domain
from the current request to the OrderFactory
OrderBillpayerUpdated
and OrderShippingAddressUpdated
eventsIt is now possible to modify the billing and shipping addresses of an existing order in the admin:
format_price()
helper functionFor the full list of changes, see the Vanilo 4.2 Changelog