Oihana PHP System

HasPricingMarkup

Provides an optional pricing markup band for a schema entity.

This is a house property — a commercial guardrail layered on top of the harvested data. It is not a price effect : it never computes a price, it only bounds what a seller may quote. The effects themselves (discounts, surcharges, segment substitutions, fixed prices) stay on PricingCondition.

It is extracted into a dedicated trait so it can be composed only by the entities that carry a pricing policy (e.g. ProductCategoryTerm) without leaking into the flat thesaurus families — mirroring HasColor and HasTreeMetrics.

Tags
author

Marc Alcaraz (ekameleon)

since
1.4.0

Table of Contents

Properties

$pricingMarkup  : QuantitativeValue|array<string|int, mixed>|null
The markup band applied on top of a base price, carried as a {@see QuantitativeValue} : - `minValue` — the floor : the lowest acceptable markup ; - `maxValue` — the ceiling, when the markup is also capped ; - `value` — the recommended (target) markup ; - `unitCode` — the unit, e.g. `'P1'` (the UN/CEFACT percent code) ; - `valueReference` — the base the markup applies to, e.g. {@see PriceType::COGS}.

Properties

$pricingMarkup

The markup band applied on top of a base price, carried as a {@see QuantitativeValue} : - `minValue` — the floor : the lowest acceptable markup ; - `maxValue` — the ceiling, when the markup is also capped ; - `value` — the recommended (target) markup ; - `unitCode` — the unit, e.g. `'P1'` (the UN/CEFACT percent code) ; - `valueReference` — the base the markup applies to, e.g. {@see PriceType::COGS}.

public QuantitativeValue|array<string|int, mixed>|null $pricingMarkup

The markup is expressed on the base, not on the selling price : sellingPrice >= base × (1 + minValue / 100). An 8 % markup over a cost of 100 is a selling price of 108 — it is not an 8 % margin on the selling price, which would be 108.70. The same calculation is already named margin by ProductProviderInfo::$buyingPriceMargin (whose base is the buying price, not the cost).

Example:

$term->pricingMarkup = new QuantitativeValue
([
    'minValue'       => 8 ,
    'unitCode'       => 'P1' ,
    'valueReference' => PriceType::COGS ,
]);
Attributes
#[HydrateAs]
\org\schema\QuantitativeValue::class
On this page

Search results