Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.36 KB

vanilo-34-released.md

File metadata and controls

46 lines (31 loc) · 1.36 KB
title excerpt date tags featured
Vanilo 3.4 Released
Vanilo 3.4 has been released with configurable cart & order items. See what's new.
2023-01-25
Releases
News
Vanilo 3
false

Vanilo 3.4 has been released with first-party configurable product support for cart & order items.

Configurable Items

Products that the user can customize are common in the E-commerce. Typical examples are:

  • Burger with extra chilli and cheese,
  • Mugs with custom text and picture,
  • Event tickets with the attendees' names,

just to name a few.

The configuration is the property of the cart/order item and not the product itself, therefore the configuration data has to be stored along with those items.

To store the configuration with a cart item use the following code:

use Vanilo\Cart\Facades\Cart;

Cart::addItem($product1, 1, ['attributes' => ['configuration' => ['mug_text' => 'I love pizza']]]);

Other Configurables

Besides the CartItem and OrderItem models, the following ones have also become configurable:

  • Carrier,
  • Shipment,
  • ShippingMethod,
  • PaymentMethod.

These models used to be configurable even in earlier versions of Vanilo, but with this release, their configuration has been made standard and uniform.

Find By SKU

With this release, both the MasterProdcutVariant and Product models have a static findBySku($sku) method.