CatalogBuilder::getProductDetailUrl

  1. Bitrix24 API (v. 23.675.0)
  2. catalog
  3. CatalogBuilder
  4. getProductDetailUrl
  • Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/url/adminpage/catalogbuilder.php
  • Класс: BitrixCatalogUrlAdminPageCatalogBuilder
  • Вызов: CatalogBuilder::getProductDetailUrl
public function getProductDetailUrl(int $entityId, array $options = [], string $additional = ''): string
	{
		if (empty($this->catalog))
		{
			return '';
		}
		if ($this->catalogType !== CCatalogSku::TYPE_OFFERS)
		{
			return $this->getElementDetailUrl($entityId, $options, $additional);
		}
		else
		{
			$result = '';
			$parentId = $this->getProductParent($entityId);
			if (!empty($parentId))
			{
				$result =  $this->fillUrlTemplate(
					$this->getUrlTemplate(self::PAGE_OFFER_DETAIL),
					$this->getOfferVariables($entityId, $parentId, $options, $additional)
				);
			}
			unset($parentId);
			return $result;
		}
	}

Добавить комментарий