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 | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true){ | |
require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
} | |
$order = \Bitrix\Sale\Order::load($order_id); | |
$collection = $order->getShipmentCollection(); | |
$shipment = $collection->getItemById($shipmentID); | |
$statusId = $shipment->getField('ALLOW_DELIVERY'); |
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 | |
require_once (__DIR__.'/settings.php'); // define('C_REST_WEB_HOOK_URL','https://domain.bitrix24.ru/rest/_userId_/_token_/'); | |
/** | |
* @version 1.36 | |
* define: | |
* C_REST_WEB_HOOK_URL = 'https://rest-api.bitrix24.com/rest/1/doutwqkjxgc3mgc1/' //url on creat Webhook | |
* or | |
* C_REST_CLIENT_ID = 'local.5c8bb1b0891cf2.87252039' //Application 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
<? | |
// добавим товар в сделку | |
if (!empty($productID)) { | |
$rows[] = [ | |
'PRODUCT_ID' => $productID, //id товара | |
'QUANTITY' => 1, //количество | |
]; | |
if ( CCrmProductRow::SaveRows('D', $deal_id, $rows) ) { | |
writeToLog('Success', 'add to deal'); | |
}else { |
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
<script src="https://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var tableToExcel = (function () { | |
// Define your style class template. | |
var style = "<style>.title{font-size:18px;}.smetaTable{box-sizing: border-box;width: 100%;}.green{background-color: #31869B; color: #ffffff;}.brown{background-color:#FABF8F;font-weight:bold;font-size:13px;}.leftimg{position: absolute;margin-top:-20px}" | |
+".rightimg{position: absolute;}" | |
+".relative{position: relative;height:40px;}</style>"; | |
var uri = 'data:application/vnd.ms-excel;base64,' | |
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook |
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 | |
// Получить список товаров у сделки или лида bitrix 24 коробка | |
// D = Deal, L = Lead; | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true){ | |
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
} | |
CModule::IncludeModule("crm"); | |
CCrmProductRow::LoadRows($ownerType = 'D', $ownerID = $deal_id, $assoc = false); |
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
<? | |
define('ROOT', $_SERVER['DOCUMENT_ROOT']); | |
require_once(ROOT.'/bitrix/crest.php'); // берется отсюда https://dev.1c-bitrix.ru/rest_help/rest_sum/crest.php | |
foreach ($_FILES as $key=>$value) { | |
$result = CRest::call( | |
'disk.folder.uploadfile', | |
[ | |
'id' => $folderId, // id папки берите нужный сами | |
'data' => [ |
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
необхкодимы установленные крипто про и ViPNet | |
cd C:\Program Files\Crypto Pro\CSP | |
csptest.exe -sfsign -sign -detached -add -in "C:\путь_до_файла.pdf" -out "C:\путь_до_файла.pdf.sig" -my электронная@почта |
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
<? | |
/** | |
* Write data to log file. | |
* | |
* @param mixed $data | |
* @param string $title | |
* | |
* @return bool | |
*/ | |
function writeToLog($data, $title = '') { |
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 | |
function get_currencies() { | |
$xml = simplexml_load_file('http://cbr.ru/scripts/XML_daily.asp'); | |
$currencies = array(); | |
foreach ($xml->xpath('//Valute') as $valute) { | |
$currencies[(string)$valute->CharCode] = (float)str_replace(',', '.', $valute->Value); | |
} | |
return $currencies; | |
} |
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
<? | |
// Не будь жлобом. Я потратил на это выходные. Подкинь на бургер! | |
// https://money.yandex.ru/to/41001562906632 или напрямую lucky-devil.ru/pay | |
// Спасибо) | |
// Если нужна помощь напиши мне lucky-devil.ru/contacts/ | |
// ТАК ЖЕ ИМЕЕТСЯ ВЕРСИЯ ДЛЯ КРОСДОМЕННОГО РЕШЕНИЯ. | |
// битрикс обновляется и временами надо поддрихтовать данный код. | |
$queryNotice = 'https://ВАШЛОГИН-В-БИТРИКС.bitrix24.ru/rest/НОМЕР-ПОЛЬЗОВАТЕЛЯ-СОЗДАВШЕГО-ВЕБХУК/КОД-ИЗ-ВЕБХУКА/im.message.add'; |