This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Sprint\Migration; | |
use Aero\Main\Hlblock\Prototype; | |
class Version20180906232013 extends Version | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$productInstance = Prototype::getInstanceByCode("Catalog"); | |
$products = $productInstance->getElements([ | |
"select" => ["ID", "NAME", "CODE", "PROPERTY_ROYAL_IMAGES", "PROPERTY_CERTIFICATES"], | |
"filter" => [ | |
[ | |
"LOGIC" => "OR", | |
["!PROPERTY_ROYAL_IMAGES" => false], ["!PROPERTY_CERTIFICATES" => false] | |
], | |
"ID" => $productId | |
], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Удаляет директорию со всеми поддиректориями и файлами | |
* @param $dir | |
*/ | |
private function removeDir($dir){ | |
$files = glob($dir . '/*'); | |
foreach ($files as $file) { | |
is_dir($file) ? $this->removeDir($file) : unlink($file); | |
} | |
rmdir($dir); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$h1NoIndex = $APPLICATION->AddBufferContent(function(){ | |
$test = $GLOBALS["APPLICATION"]->GetPageProperty('H1_NO_INDEX'); | |
return $test; | |
}); | |
?> | |
<?if($h1NoIndex):?> | |
<noindex> | |
<h1><?=$APPLICATION->ShowProperty("h1");?><span class="title-line__counter"></span></h1> | |
</noindex> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="form-wrap"> | |
<form id="main-form" method="post" action="" data-ajax-url="/ajax/?controller=user&action=send"> | |
<div> | |
<label for="name">Имя</label> | |
<input type="text" name="name" required> | |
</div> | |
<div class="radio"> | |
<span>Пол</span> | |
<label> | |
<input type="radio" name="sex" value="мужской">мужской |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$result = \Aero\Tools\Iblock\Catalog\Products::getInstanceByCode()->getElementsES([ | |
'filter' => | |
[ | |
'ACTIVE' => 'Y', | |
'>PROPERTIES.COLLECTION' => 0 | |
], | |
'aggregations' => | |
[ | |
'PROPERTIES.COLLECTION' | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arFilter = [ | |
"ACTIVE" => "Y", | |
"!>ACTIVE_FROM" => \CDatabase::FormatDate(date("Y-m-d H:i:s"), | |
"YYYY-MM-DD HH:MI:SS", | |
\CSite::GetDateFormat("FULL")), | |
"!<ACTIVE_TO" => \CDatabase::FormatDate(date("Y-m-d H:i:s"), | |
"YYYY-MM-DD HH:MI:SS", | |
\CSite::GetDateFormat("FULL")), | |
"%XML_ID" => "FILTER" | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$propEnumId = \CIBlockPropertyEnum::GetList(["SORT"=>"ASC"], ["IBLOCK_ID"=> $this->getId(), "CODE"=>"NO_CERTIFICATE", "XML_ID" => "Y"])->Fetch()["ID"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Aero\Main\Traits\Elements; | |
class Main{ | |
use Elements; | |
private function getDiamondsCodes(){ | |
$arIbData = self::getElements(\Bitrix\Iblock\ElementTable::class, | |
[ | |
'select' => ['ID', 'IBLOCK_ID', 'CODE', 'NAME'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$offersProductAll = \CCatalogSKU::getProductList($offerIds, IB_TradeOffers); |