CoolCMS API

BatchDecorationTrait

Batch decoration with the price (`PriceResolver`) and availability ({@see \App\UI\Api\Eshop\Models\Managers\ProductSetManager::getAvailabilities()}).

One call to .../current-prices and one to .../availability regardless of the number of sets. available / availableSets are never cached; call on every request. Shared by the list (N sets) and the detail (1 set, the same batch method with a one-item array).

IMPORTANT: the only place that computes the VAT-inclusive catalog price. The price list is always the base without VAT; whether to show the computed price is given by withVat of each fetchCurrentPrices() row (engine treatment per set), not by one shared seller flag. The entity therefore stores the price to display (plus the base without VAT in currentPriceWithoutVat), so templates (buy-box.latte, Items/_item.latte) recompute nothing.

Table of Contents

Methods

decorateWithPriceAndAvailability()  : void

Methods

On this page

Search results