ProductPrice
class ProductPrice extends Price
Properties
| protected array | $config | The unit configurations. | from Price |
| protected string | $unit | The products unit. | from Price |
| protected int | $volume | The products volume. | from Price |
| protected string | $volumeUnit | The products volume unit. | from Price |
| protected int | $price | The products price. | from Price |
| protected string | $priceUnit | The products price unit. | from Price |
| protected Product | $product | The product. | from Price |
Methods
int
amount()
Get the price amount.
string
unit()
Get the price unit.
int
canonicalizedVolume()
Get the canonicalized volume.
bool
isValid()
Check if the price attributes are valid.
Details
at line 14
int
amount()
Get the price amount.
at line 32
string
unit()
Get the price unit.
in Price at line 94
int
total()
Add commission to the amount.
in Price at line 107
protected string
baseUnit(string $unit)
Fetch the base for the given unit.
in Price at line 118
protected int
factor(string $unit)
Fetch the factor for the given unit.
in Price at line 128
protected mixed
config(string $unit, string $key)
Get the units config and store it on the object.
at line 42
protected int
canonicalizedVolume()
Get the canonicalized volume.
at line 52
protected bool
isValid()
Check if the price attributes are valid.