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
public function getProductsWithPager($params, $countInterval){ | |
return $this->pagerIblock($params, $countInterval); | |
} | |
public function pagerIblock($params, $countInterval) | |
{ | |
$arResult = []; | |
$countMax = CIBlockElement::GetList(array('ID' => 'ASC'), $params["filter"], array(), false, array('ID')); | |
if ($countMax > 0) { |
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 Aeroidea\Settings\Options\ConfigurationTable; | |
use Aeroidea\Settings\Options\OptionTable; | |
use Aeroidea\Settings\Options\ValuesTable; | |
use Bitrix\Main\Application; | |
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 Aeroidea\Settings\Options\ConfigurationTable; | |
use Aeroidea\Settings\Options\OptionTable; | |
use Aeroidea\Settings\Options\ValuesTable; | |
use Bitrix\Main\Application; | |
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
function createMap(){ | |
myMap = new ymaps.Map($map[0], { | |
center: [start.lat, start.lan], | |
zoom: 15, | |
autoFitToViewport:'always', | |
controls: [] | |
},{ | |
//чтобы убрать кнопку открыть в яндекс картах | |
suppressMapOpenBlock: true | |
}); |
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
//если остались товары, то их надо удалить | |
if (!empty($arBasketItems)) { | |
foreach ($arBasketItems as $arBasketItem) { | |
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/upload/CSaleBasketDelete891679812.log", time("c") . " Заказ " . $OrderID . ", попытка удалить товар " . $arBasketItem["ID"] . "\n", FILE_APPEND | LOCK_EX); | |
//CSaleBasket::Delete($arBasketItem["ID"]); | |
file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/upload/CSaleBasketDelete891679812.log", time("c") . " Заказ " . $OrderID . ", удален товар " . $arBasketItem["ID"] . "\n", FILE_APPEND | LOCK_EX); | |
$arLoadProductArray = Array( | |
"ACTIVE" => "Y" | |
); |
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
$request = Application::getInstance()->getContext()->getRequest(); | |
try { | |
if (!Loader::includeModule('aero.main')) { | |
throw new Exception('Can\'t include module "Aero".'); | |
} | |
$name = htmlspecialchars($request->getQuery("controller")); | |
$action = htmlspecialchars($request->getQuery("action")); | |
$controller = Mvc::factory($name); | |
$controller->doAction($action); |
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
$arOrders = []; | |
//Берем все заказы | |
$arFilter = Array("PROPERTY_VAL_BY_CODE_UPLOAD_SUZ" => "N", "ID" => 86589); | |
$rsSales = CSaleOrder::GetList(array("DATE_INSERT" => "DESC"), $arFilter, false, false, array("*")); | |
while ($arSales = $rsSales->Fetch()) { | |
$arOrders[$arSales["ID"]] = $arSales; | |
} | |
//берем все свойства заказов по их кодам | |
$orderProps = []; |
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
/** | |
* На вход принимает элементы (товары или тп) + массив свойств-привязок к справочникам | |
* На выходе: подробные данные элементов по этим справочникам | |
* Важно! для бриллианта в массиве $arPropCodes может быть только STONES_ATTACH | |
* @param $items | |
* @param $arProps | |
*/ | |
public function getDetailPageResHL($items, $arPropCodes){ | |
//массив из элементов с значениями свойств, привязанных к hl | |
$itemsHlPropValues = []; |
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); |
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'], |