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
#сбросить все измененния и откатится | |
git reset --hard HEAD | |
git clean -fd | |
#удалить файл из git | |
git rm -r --cached <path> |
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://github.com/barryvdh/laravel-ide-helper | |
https://github.com/barryvdh/laravel-debugbar | |
#Модели | |
php artisan make:model Models/BlogPost #создать модель | |
php artisan make:model Models/BlogPost -m #создать модель и миграцию для нее | |
#Очистить кеш | |
php artisan config:cache |
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
<? | |
function getAllDiscounts() | |
{ | |
Bitrix\Main\Loader::includeModule('sale'); | |
require_once ($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/handlers/discountpreset/simpleproduct.php"); | |
$arDiscounts = array(); | |
$arProductDiscountsObject = \Bitrix\Sale\Internals\DiscountTable::getList(array( | |
'filter' => array( | |
'=ACTIVE' => 'Y', | |
// 'ID' => 1231, |
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
//*замена адрема после переноса | |
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://ilyarrl2.beget.tech', 'http://re-wp.by') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = REPLACE(guid, 'http://ilyarrl2.beget.tech','http://re-wp.by'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://ilyarrl2.beget.tech', 'http://re-wp.by'); | |
update_option( 'siteurl', 'http://ilyarrl2.beget.tech' ); | |
update_option( 'home', 'http://ilyarrl2.beget.tech' ); | |
//**замена адрема после переноса |
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://estrin.pw/bitrix-d7-snippets/s/current-user-is-authorized/ | |
if(\Bitrix\Main\Engine\CurrentUser::get()->getId()) | |
{} | |
\Bitrix\Main\Engine\CurrentUser::get()->isAdmin() | |
\Bitrix\Main\Engine\CurrentUser::get()->getLogin() | |
//лого без ссылки на главной | |
<? $isIndex = ($APPLICATION->GetCurPage(false) == SITE_DIR)?> | |
<?if (!$isIndex):?> |
NewerOlder