/** * Fill options, get price and add to cart. * * @return array */ protected function getProductPrice() { $prices = []; $this->catalogCategoryView->getListProductBlock()->openProductViewPage($this->product->getName()); $priceBlock = $this->catalogProductView->getWeeeViewBlock()->getPriceBlock(); $this->catalogProductView->getViewBlock()->fillOptions($this->product); foreach ($this->expectedPrices['product'] as $key => $type) { $prices[$key] = $this->getPrice($priceBlock, $key); } return $prices; }