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
# Изменение и просмотр папок | |
ls -al | |
# Переход к другой папке | |
cd pathname/directory/subdirectory | |
# Показ текущей директории | |
pwd | |
# Создание папки |
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
<? | |
$dbProductDiscounts = CCatalogDiscount::GetList( | |
array("SORT" => "ASC"), | |
array("ACTIVE" => "Y"), | |
false, | |
false, | |
array("ID", "PRODUCT_ID") | |
); | |
while ($arProductDiscounts = $dbProductDiscounts->Fetch()) { | |
$akcii_arr[] = $arProductDiscounts["PRODUCT_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
<? | |
// Отправка счета или квитанции в письме | |
AddEventHandler("sale", "OnOrderSave", "OnOrderAddHandlerPS"); | |
function OnOrderAddHandlerPS ($ID, $arFields, $arOrder) { | |
if ( $arOrder["PAY_SYSTEM_ID"] == 12 ) { | |
//получаем данные заказа | |
$order = \Bitrix\Sale\Order::load($ID); | |
$paymentCollection = $order->getPaymentCollection(); |
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 (!CModule::IncludeModule('sale') | |
|| !CModule::IncludeModule('iblock') | |
|| !CModule::IncludeModule('catalog') | |
|| !CModule::IncludeModule('currency')) | |
die(); | |
global $USER, $APPLICATION; | |
$work = true; |
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
<? | |
AddEventHandler("sale", "OnOrderNewSendEmail", "OnOrderNewSendEmailNewFields"); | |
function OnOrderNewSendEmailNewFields($orderID, &$eventName, &$arFields){ | |
$arOrder = CSaleOrder::GetByID($orderID); | |
$country = ""; | |
$city = ""; | |
$address = ""; | |
$order_props = CSaleOrderPropsValue::GetOrderProps($orderID); | |
while ($arProps = $order_props->Fetch()){ |
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
<a id="go-to-top" href="#" class="go-to-top" role="button" title="Вверх"> | |
<i class="fa fa-chevron-up" aria-hidden="true"></i> | |
</a> |
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
<? | |
foreach($arResult["ITEMS"] as $index => $arItem) | |
{ | |
if (!empty($arItem["PROPERTIES"]["PHOTO_MAIN"]["VALUE"])) | |
{ | |
$arResult["ITEMS"][$index]["PROPERTIES"]["PHOTO_MAIN"]["SRC"] = CFile::GetPath($arItem["PROPERTIES"]["PHOTO_MAIN"]["VALUE"]); | |
} | |
} |
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
<? | |
//Отправка логина и пароля | |
AddEventHandler("main", "OnAfterUserAdd", array('UserHandler', "CSendUserPass")); | |
//Подстановка e-mail как логин | |
AddEventHandler("main", "OnBeforeUserRegister", array('UserHandler', "OnBeforeUserRegister")); | |
class UserHandler | |
{ | |
public static function CSendUserPass($arFields) | |
{ |
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://<сайт>/bitrix/admin/1c_exchange.php?type=sale&mode=checkauth | |
В четвертой строке сайт вернет токен(session id) | |
затем | |
http://<сайт>/bitrix/admin/1c_exchange.php?type=sale&mode=init + "&" + токен + "&version=2.08" | |
затем |
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 | |
namespace Grizzly; | |
use Bitrix\Main\Loader; | |
/* | |
$param = array( | |
'id' => 38, | |
'width' => 1200, | |
'height' => 999999, | |
'resize' => 'DETAIL_PICTURE' |
OlderNewer