phpDocumentor

ProductPriceConversionService

Interface ProductPriceConversionService

Tags
deprecated

Since 4.7, the gambio shop-system supports submodules. Those product domains will be refactored into submodules too. All important changes will be documented in the developer journal as soon as they are implemented.

Table of Contents

getGrossPrice()  : float
Converts a given net price of a product to a gross price if the gross-admin configuration is activated for the Gambio Admin, otherwise it will return the net price unchanged.
getNetPrice()  : float
Converts a given gross price of a product to a net price if the gross-admin configuration is deactivated for the Gambio Admin, otherwise it will return the gross price unchanged.

Methods

getGrossPrice()

Converts a given net price of a product to a gross price if the gross-admin configuration is activated for the Gambio Admin, otherwise it will return the net price unchanged.

public getGrossPrice(float $price, int $productId[, int $precision = 4 ]) : float
Parameters
$price : float

net price needed to be converted to gross

$productId : int

product ID to get related tax rates

$precision : int = 4

for which decimal should the results be rounded up

Return values
float

getNetPrice()

Converts a given gross price of a product to a net price if the gross-admin configuration is deactivated for the Gambio Admin, otherwise it will return the gross price unchanged.

public getNetPrice(float $price, int $productId[, int $precision = 4 ]) : float
Parameters
$price : float

gross price needed to be converted to net

$productId : int

product ID to get related tax rates

$precision : int = 4

for which decimal should the results be rounded up

Return values
float

Search results