OpenCart 🇺🇦

Схема

public mixed getBestPrice ( $asin, $condition )

Аргументы

Аргумент Возможный тип Описание
$asin
$condition

Описание

Метод пока еще не документирован.

Исходный код

$search_params = array(
	'asin' => $asin,
	'condition' => $condition,
);

$bestPrice = '';

$result = json_decode($this->openbay->amazonus->callWithResponse('productv3/getPrice', $search_params), 1);

if (isset($result['Price']['Amount']) && $result['Price']['Currency'] && $this->currency->has($result['Price']['Currency'])) {
	$bestPrice['amount'] = number_format($this->currency->convert($result['Price']['Amount'], $result['Price']['Currency'], $this->config->get('config_currency')), 2);
	$bestPrice['shipping'] = number_format($this->currency->convert($result['Price']['Shipping'], $result['Price']['Currency'], $this->config->get('config_currency')), 2);
	$bestPrice['currency'] = $result['Price']['Currency'];
}

return $bestPrice;