Exemplo n.º 1
0
 /**
  * Get price configuration
  *
  * @param \Magento\Catalog\Model\Product\Option\Value|\Magento\Catalog\Model\Product\Option $option
  * @return array
  */
 protected function _getPriceConfiguration($option)
 {
     $optionPrice = $this->pricingHelper->currency($option->getPrice(true), false, false);
     $data = ['prices' => ['oldPrice' => ['amount' => $this->pricingHelper->currency($option->getRegularPrice(), false, false), 'adjustments' => []], 'basePrice' => ['amount' => $this->_catalogData->getTaxPrice($option->getProduct(), $optionPrice, false, null, null, null, null, null, false)], 'finalPrice' => ['amount' => $this->_catalogData->getTaxPrice($option->getProduct(), $optionPrice, true, null, null, null, null, null, false)]], 'type' => $option->getPriceType(), 'name' => $option->getTitle()];
     return $data;
 }