/** * Prepare tier price data. * * @param InjectableFixture $product * @return array */ protected function prepareTierPrices(InjectableFixture $product) { $tierPrices = $product->getTierPrice(); foreach ($tierPrices as $key => $tierPrice) { $tierPrices[$key]['price'] = number_format($tierPrices[$key]['price'], $this->priceFormat); } return $tierPrices; }
/** * Prepare tier price data. * * @param InjectableFixture $product * @return array */ protected function prepareTierPrices(InjectableFixture $product) { $tierPrices = $product->getTierPrice(); $percents = $product->getDataFieldConfig('price')['source']->getPreset(); foreach ($tierPrices as $key => $tierPrice) { $tierPrices[$key]['price'] = number_format($tierPrices[$key]['price'], $this->priceFormat); $tierPrices[$key]['percent'] = $percents[$key]['percent']; } return $tierPrices; }