/** * Get prices on category page * * @param FixtureInterface $product * @param array $actualPrices * @return array */ protected function getCategoryPrice(FixtureInterface $product, $actualPrices) { $priceBlock = $this->catalogCategoryView->getWeeeListProductBlock()->getProductItem($product)->getPriceBlock(); $actualPrices['category_price'] = $priceBlock->getPrice(); $actualPrices['fpt_category'] = $priceBlock->getFptPrice(); $actualPrices['fpt_total_category'] = $priceBlock->getFinalPrice(); return $actualPrices; }
/** * Get prices on category page * * @param string $productName * @param array $actualPrices * @return array */ protected function getCategoryPrice($productName, $actualPrices) { $productBlock = $this->catalogCategoryView->getListProductBlock(); $actualPrices['category_price'] = $productBlock->getProductPriceBlock($productName)->getEffectivePrice(); $productWeeeBlock = $this->catalogCategoryView->getWeeeListProductBlock(); $actualPrices['fpt_category'] = $productWeeeBlock->getProductFptBlock($productName, $this->fptLabel)->getFpt(); $actualPrices['fpt_total_category'] = $productWeeeBlock->getProductFptBlock($productName, $this->fptLabel)->getFptTotal(); return $actualPrices; }
/** * Get prices on category page. * * @param InjectableFixture $product * @return array */ protected function getCategoryPrices(InjectableFixture $product) { $result = []; $priceBlock = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($product->getName()); foreach ($this->categoryPrices as $item) { $result[$item] = $this->getPrice($priceBlock, $item); } return $result; }
/** * 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; }
/** * Get prices on category page * * @param FixtureInterface $product * @param array $actualPrices * @return array */ protected function getCategoryPrice(FixtureInterface $product, $actualPrices) { $actualPrices['category_price_incl_tax'] = $this->catalogCategoryView->getListProductBlock()->getProductItem($product)->getPriceBlock()->getPriceIncludingTax(); return $actualPrices; }
/** * Get prices on category page * * @param string $productName * @param array $actualPrices * @return array */ protected function getCategoryPrice($productName, $actualPrices) { $actualPrices['category_price_incl_tax'] = $this->catalogCategoryView->getListProductBlock()->getProductPriceBlock($productName)->getEffectivePrice(); return $actualPrices; }