Merx

$price->toString()

Returns the price as string

$price->toString(null|string $key = null): string

Parameters

Name Type Default Description
$key null or string null

Use priceNet to get net price as formatted currency. When not set, price or priceNet is used, depending on tax inclusion of pricing rule.

Return type

string

Formatted price as string, e.g. "119,00 €"

Description

Depending if tax is included or not, net or gross price is used.
Use $key to determine which price is used.

Parent class

Wagnerwagner\Merx\Price