3namespace Bitrix\Seo\BusinessSuite;
5use Bitrix\Main\Application;
7use Bitrix\Main\Text\Encoding;
8use Bitrix\Main\Web\Json;
9use Bitrix\Seo\BusinessSuite\Configuration\Facebook\Installs;
10use Bitrix\Seo\BusinessSuite\Configuration\Facebook\Setup;
11use Bitrix\Seo\Retargeting\Response;
15 private function getSetup():
Setup
27 private function getBusinessId(): ?
string
29 $setup = $this->getSetup();
31 return $setup->get($setup::BUSINESS_ID);
34 private function getInstalls():
Installs
36 static $installs =
null;
38 if ($installs ===
null)
46 private function getCatalogId(): ?
string
48 return $this->getInstalls()->getCatalog();
53 return Response::create(self::TYPE_CODE)->addError(
new Error(
$error));
58 $businessId = $this->getBusinessId();
59 if ($businessId ===
null)
61 return $this->createResponseWithError(
'Empty business id.');
69 'parameters' => array_merge(
72 'fbe_external_business_id' => $businessId,
81 if (empty($productData))
83 return $this->createResponseWithError(
'Empty product data.');
86 return $this->sendRequest(
'catalog.products.batch', [
87 'allow_upsert' =>
true,
88 'requests' => $productData,
96 return $this->createResponseWithError(
'Empty handle data.');
99 return $this->sendRequest(
'catalog.products.check.batch.status', [
100 'catalog_id' => $this->getCatalogId(),
101 'load_ids_of_invalid_requests' =>
true,
108 if (empty($retailerIds))
110 return $this->createResponseWithError(
'Empty retailer ids.');
113 return $this->sendRequest(
'catalog.products.get.info', [
114 'catalog_id' => $this->getCatalogId(),
115 'filter' => Json::encode([
117 'is_any' => $retailerIds,
120 'fields' =>
'id, retailer_id, review_status, review_rejection_reasons',
getMethodName(string $name)
getProductsInfo(array $retailerIds)
checkBatchRequestStatus(string $handle)
batchCatalogProducts(array $productData)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)