This file contains 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
<? | |
class NAV_ORDER_MAKE{ | |
function MergeOrderProps($arResult,$sort=true){ | |
if(isset($arResult['ORDER_PROP']['USER_PROPS_MERGE'])){ | |
return $arResult; | |
} | |
if (!is_array($arResult["ORDER_PROP"]["USER_PROPS_Y"]) && is_array($arResult["ORDER_PROP"]["USER_PROPS_N"])){ | |
$arResult['ORDER_PROP']['USER_PROPS_MERGE'] = $arResult["ORDER_PROP"]["USER_PROPS_N"]; | |
return $arResult; |
This file contains 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
http://skill.vpvd.ru/oshibka-udaleniya-tovara.html | |
1) Оключить складской учет | |
2) Обнуть остатки товара | |
3) включить складской учет | |
4) Перейти в Мазазин->Складской учет->Документы | |
5) Отменить (обратить) проводку документов | |
По необходимости: | |
6) Удалить документ | |
7) Оключить складской учет |
This file contains 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
<? | |
define("NO_KEEP_STATISTIC", true); // Не собираем стату по действиям AJAX | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
$action = (string)$_REQUEST['action']; | |
if($action == "addToFav"){ | |
$id = (int)$_REQUEST['id']; | |
if($id>0){ | |
nav_favorite::addToFav($id); |
This file contains 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 setTitle($Mess = false){ | |
if(!empty($Mess)){ | |
global $APPLICATION; | |
$APPLICATION->SetTitle($Mess); | |
?> | |
<script type="text/javascript"> | |
document.title = "<?=CUtil::JSEscape($Mess);?>"; | |
</script> | |
<? |
This file contains 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
<? | |
class nav_catalog{ | |
function canBuy($arItem){ | |
if(isset($arItem['OFFERS']) && !empty($arItem['OFFERS'])){ | |
$can_buys = array(); | |
foreach($arItem['OFFERS'] as $offer){ | |
$can_buys[] = self::canBuy($offer); | |
} | |
$can_buy = "N"; |
This file contains 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(!function_exists("wrapPhpCache")){ | |
function wrapPhpCache(){ | |
//$MainParam, $Callable, $FunctionParam = false | |
//$Callable, $MainParam, $FunctionParam = false | |
//$MainParam, $Callable, $FunctionParam1, $FunctionParam2 .... | |
$arArgs = func_get_args(); | |
$_MParams = $arArgs[0]; | |
$_MCallable = $arArgs[1]; |
This file contains 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
// sku_id=>element_id | |
function GetLastViewed($limit = false){ | |
// \bitrix\components\bitrix\catalog.viewed.products\class.php #657 | |
$map = array(); | |
if (!Bitrix\Main\Loader::includeModule('catalog')){ | |
return array(); | |
} | |
if (!Bitrix\Main\Loader::includeModule('sale')){ | |
return array(); |
This file contains 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 | |
define("NO_KEEP_STATISTIC", true); // Не собираем стату по действиям AJAX | |
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
$ajax_action = strval($_REQUEST['ajax_action']); | |
if($ajax_action == 'AddToDelay'){ | |
$arParams = $_REQUEST['arParams']; | |
\Bitrix\Main\Loader::includeModule('iblock'); |
This file contains 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
<? | |
//original http://leovy.ru/programmirovanie/cms/1s_bitriks/kak-uznat-id-sklada-iz-zapisi-zakaza-1s_bitriks | |
// bitrix ver < 16.0 | |
CModule::IncludeModule('sale'); | |
$ORDER_ID = 1; | |
$arOrder = CSaleOrder::GetByID($ORDER_ID); | |
echo $arOrder["STORE_ID"]; | |
// bitrix ver >=16.0 |
This file contains 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 | |
return array ( | |
'utf_mode' => | |
array ( | |
'value' => true, | |
'readonly' => true, | |
), | |
'cache_flags' => | |
array ( | |
'value' => |
OlderNewer