-
Склонировать d7dull в папку
/local/modules
-
Заменить названия во всех файлах с учётом регистра
maycat
— ваш ник, разрешены ТОЛЬКО латинские буквыd7dull
— название модуля Для этого нужно пройтись контекстным поиском по всей папке и внести изменения + переименовать файл в папке admin в соответствии с названияем модуля -
Продумать структуру классов и завести их в папке
lib/
(подробнее о приёмах организации структуры - смотри видео) С помощьюinclude.php
подключить автолоад созданным классам
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 | |
use \Bitrix\Main\Application; | |
require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
global $APPLICATION; | |
$POST_RIGHT = $APPLICATION->GetGroupRight("main"); | |
if ($POST_RIGHT < "W") | |
$APPLICATION->AuthForm("Доступ запрещен"); |
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 | |
/** | |
* Bitrix24 | |
* | |
* Интеграция с Битрикс24 - создание лидов | |
* | |
* @category snippet | |
* @version 0.1 | |
* @internal @properties &url=URL;text; &user_id=Assigned user ID;text; | |
* @internal @installset sample |
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 sendBitrix(user, order, referer) { | |
// let yourName = $('input[name="your-name"]').val(); | |
/** Ajax Call */ | |
$.ajax({ | |
cache: false, | |
timeout: 8000, | |
url: '/wp-admin/admin-ajax.php', |
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
<? | |
//<title>Yandex</title> | |
/** @global CUser $USER */ | |
/** @global CMain $APPLICATION */ | |
use Bitrix\Currency, | |
Bitrix\Iblock, | |
Bitrix\Catalog; | |
IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/catalog/export_yandex.php'); | |
set_time_limit(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 | |
namespace Burov\Handlers; | |
/** | |
* Class Restrictions | |
* @package Burov\Handlers | |
* @link https://gist.github.com/burovofficial/878edc4aec1477d54f92913cd5e25cbf | |
* | |
* В данном примере используюется кастомизация и добавление своих ограничений (рестрикций) |
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("catalog", "OnPriceUpdate", array("TestLogger", "OnPriceUpdate")); | |
AddEventHandler("catalog", "OnBeforePriceUpdate", array("TestLogger", "OnBeforePriceUpdate")); | |
AddEventHandler("catalog", "OnBeforePriceAdd", array("TestLogger", "OnBeforePriceAdd")); | |
AddEventHandler("catalog", "OnPriceAdd", array("TestLogger", "OnPriceAdd")); | |
AddEventHandler("catalog", "OnBeforePriceDelete", array("TestLogger", "OnBeforePriceDelete")); | |
AddEventHandler("catalog", "OnBeforeProductPriceDelete", array("TestLogger", "OnBeforeProductPriceDelete")); |
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 Isaev; | |
use \Bitrix\Main\Loader; | |
use \Bitrix\Sale; | |
use \Bitrix\Main\SystemException; | |
Loader::includeModule('sale'); | |
Loader::includeModule('catalog'); |
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 | |
class RestrictByOutlet extends Bitrix\Sale\Delivery\Restrictions\Base | |
{ | |
public static function getClassTitle() | |
{ | |
return 'Ограничение по свойству outlet'; | |
} |
OlderNewer