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 | |
| /** | |
| * Набор методов для работы с highloadblock Bitrix | |
| * User: darkfriend <hi@darkfriend.ru> | |
| * Date: 25.04.2017 | |
| * @version 1.0.3 | |
| * updateField | |
| * https://github.com/darkfriend/hlhelpers | |
| */ |
Based on https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
- A self-managed VPS or dedicated server with Ubuntu 20.04 running Apache 2.4.xx.
- A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
Per default it will be apache2 version 2.4.41 what is enought for http2 support.
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
| # | |
| # This small example shows you how to access JS-based requests via Selenium | |
| # Like this, one can access raw data for scraping, | |
| # for example on many JS-intensive/React-based websites | |
| # | |
| from time import sleep | |
| from selenium import webdriver | |
| from selenium.webdriver import DesiredCapabilities |
В init.php PHP 7.0+ Bitrix (Бизнес) 16+
Изменение типов цен в зависимости от суммы коризны.
- При сумме заказа до 15 000 рублей по розничной стоимости - тип цены розница
- При сумме заказа от 15.000 руб по розничной стоимости - тип цены мелкий опт
- При сумме заказа от 50.000 руб по мелкий опт стоимости - тип цены средний опт
- При сумме заказа от 100.000 руб по средний опт стоимости - тип цены крупный опт
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/modules/main/classes/general/menu.php:192 | |
| `$bCacheIsAllowed = CACHED_menu!==false && !$USER->IsAuthorized() && $this->MenuExtDir == '';` | |
| В кеш сохраняются значения LINK, LINKS, PERM | |
| Это единственное место использования CACHED_menu, и самое тяжелое что там есть - права доступа к файлу | |
| Т.е. получаем что CACHED_menu - это кеш меню для неавторизованного пользователя, для экономии на получении | |
| прав доступа. | |
| */ |
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 | |
| use \Bitrix\Main\Loader; | |
| use \Bitrix\Main\SystemException; | |
| use \Bitrix\Sale; | |
| use \Bitrix\Main\UserTable; | |
| use \Bitrix\Main\EventManager; | |
| $eventManager = EventManager::getInstance(); | |
| $eventManager->addEventHandler('sale', 'OnOrderNewSendEmail', 'customSaleMails'); |
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 | |
| /* | |
| * WordPress filters to remove default image sizes and add custom sizes. | |
| * Replace PREFIX with your theme's prefix as necessary. | |
| * Regenerate thumbnails after adding this to your theme's functions.php file. | |
| */ | |
| // This function unsets the default image sizes | |
| function PREFIX_remove_default_image_sizes( $sizes ) { | |
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
| .DS_Store | |
| Thumbs.db | |
| /.idea | |
| /bitrix | |
| /upload | |
| /*.xml | |
| /*.log | |
| /*.sh | |
| /*.sql | |
| /.htsecure |
NewerOlder