9Loc::loadMessages(__FILE__);
30 self::LANDING_STORE_CLOTHES,
31 self::LANDING_STORE_INSTAGRAM,
32 self::LANDING_STORE_CHATS,
33 self::LANDING_STORE_MINI_ONE_ELEMENT,
34 self::LANDING_STORE_MINI_CATALOG,
35 self::LANDING_STORE_STORE_V3,
47 $result = Sale\TradingPlatformTable::add([
50 "NAME" => Loc::getMessage(
'SALE_LANDING_NAME', [
'#NAME#' =>
$data[
'TITLE']]),
52 "CLASS" =>
'\\'.static::class,
53 "XML_ID" => static::generateXmlId(),
78 return (
int)mb_substr($this->
getCode(), mb_strrpos($this->
getCode(),
'_') + 1);
119 if (
$fields[
'TYPE'] !==
'STORE')
124 $primary =
$event->getParameter(
'primary');
126 if (!$landing->isInstalled())
140 $primary =
$event->getParameter(
'primary');
142 if ($landing->isInstalled())
144 Sale\TradingPlatformTable::update(
147 'NAME' => Loc::getMessage(
'SALE_LANDING_NAME', [
'#NAME#' =>
$fields[
'TITLE']]),
158 $primary =
$event->getParameter(
'primary');
161 if ($landing->isInstalled())
168 $dbRes = $tradeBindingCollection::getList([
171 '=TRADING_PLATFORM_ID' => $landing->getId()
177 $landing->unsetActive();
181 $landing->uninstall();
192 $delete =
$event->getParameter(
'delete');
194 $res = \Bitrix\Landing\Site::getList([
200 'CHECK_PERMISSIONS' =>
'N',
211 if (!$landing || !$landing->isInstalled())
218 $landing->unsetActive();
222 $landing->setActive();
232 return static::TRADING_PLATFORM_CODE.static::CODE_DELIMITER.$id;
238 public function getInfo()
240 if (!
Main\Loader::includeModule(
'landing'))
251 $dbRes = \Bitrix\Landing\Site::getList([
253 '=ID' => $this->getSiteId(),
254 'CHECK_PERMISSIONS' =>
'N',
255 '=DELETED' => [
'Y',
'N'],
262 $this->site[
'PUBLIC_URL'] = \Bitrix\Landing\Site::getPublicUrl($this->getSiteId());
271 if (!isset(
$data[
'XML_ID']) || !
$data[
'XML_ID'])
273 return parent::getAnalyticCode();
276 foreach (static::$stores as $store)
278 if (mb_strpos(
$data[
'XML_ID'], $store) !==
false)
284 return $data[
'XML_ID'];
295 if (
$type === static::LINK_TYPE_PUBLIC_DETAIL_ORDER)
297 return $this->getLandingSysPageUrl(
300 'SECTION' =>
'orders',
306 if (
$type === static::LINK_TYPE_PUBLIC_FEEDBACK)
308 return $this->getLandingSysPageUrl(
'feedback');
319 private function getLandingSysPageUrl(
string $type,
array $additional = []): string
321 if (!
Main\Loader::includeModule(
'landing'))
326 return \Bitrix\Landing\Syspage::getSpecialPage($this->getSiteId(),
$type, $additional);
334 return (
string)($this->
getInfo()[
'TITLE'] ??
'');
344 if (!isset(
$info[
'XML_ID']))
349 return mb_strpos(
$info[
'XML_ID'],
$type) !==
false;
const ENTITY_TRADE_BINDING_COLLECTION
static getInstance($type)
const REGISTRY_TYPE_ORDER
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($NS['step']==6) if( $NS[ 'step']==7) if(COption::GetOptionInt('main', 'disk_space', 0) > 0) $info