172 public static function update(
int $siteId): bool
176 if (!$site || !in_array($site[
'TPL_CODE'], self::ONLY_CODES,
true))
181 $catalogFolderId = self::createFolder($siteId);
182 if (!$catalogFolderId)
188 !($orderId = self::createPageIfNotExists($siteId, $catalogFolderId,
'store-chats-dark/catalog_order'))
189 || !($detailId = self::createPageIfNotExists($siteId, $catalogFolderId,
'store-chats-dark/catalog_detail'))
190 || !($catalogId = self::createPageIfNotExists($siteId, $catalogFolderId,
'store-chats-dark/catalog'))
191 || !($headerId = self::createPageIfNotExists($siteId, $catalogFolderId,
'store-chats-dark/catalog_header'))
192 || !($footerId = self::createPageIfNotExists($siteId, $catalogFolderId,
'store-chats-dark/catalog_footer'))
199 self::setIndexToFolder($catalogFolderId, $catalogId);
200 self::setTemplateToLanding($catalogId,
'header_footer', [1 => $headerId, 2 => $footerId]);
201 self::setTemplateToLanding($detailId,
'header_footer', [1 => $headerId, 2 => $footerId]);
202 self::setTemplateToLanding($orderId,
'header_footer', [1 => $headerId, 2 => $footerId]);
204 self::replaceFooterLinks($footerId, $siteId);