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
//string number 2424 in core/xpdo/xpdo.class.php | |
$encoded= json_encode($array,JSON_PARTIAL_OUTPUT_ON_ERROR); |
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
[[pdoResources? | |
&parents=`3` | |
&includeTVs=`test` | |
&tvPrefix=`` | |
&processTVs=`test` | |
&tpl=`@INLINE | |
<p>[[+pagetitle]]</p> | |
<sub>[[+test]]</sub> | |
` | |
&where=`["1 = 1 AND FIND_IN_SET('5', replace(test, '||', ','))"]` |
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
Это обычный букмарклет для быстрого включения и выключения режима отладки | |
Включение отладки - javascript:(function(){location.href=location.href+"?debug=1&cache=1&add=1"})(); | |
Выключение отладки - javascript:(function(){location.href=location.origin+location.pathname})(); |
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
$address = $modx->getObject('msOrderAddress', $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
Вывести все доступные объекты в плагине | |
$modx->log(1, print_r(array_keys($scriptProperties),1)); |
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 | |
switch ($modx->event->name) { | |
case 'msOnManagerCustomCssJs': | |
if ($page != 'orders') return; | |
$modx->controller->addHtml(" | |
<script type='text/javascript'> | |
Ext.ComponentMgr.onAvailable('minishop2-grid-orders', function(){ | |
Ext.override(miniShop2.grid.Orders , { | |
getMenu: function (grid, rowIndex) { |
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
$_lang['autotag'] = 'Авто-метка'; | |
$_lang['text'] = 'Текст'; | |
$_lang['textarea'] = 'Текстовая область'; | |
$_lang['textareamini'] = 'Текстовая область (мини)'; | |
$_lang['richtext'] = 'Текстовый редактор'; | |
$_lang['dropdown'] = 'Выпадающий список'; | |
$_lang['listbox'] = 'Список (одиночный выбор)'; | |
$_lang['listbox-multiple'] = 'Список (множественный выбор)'; | |
$_lang['list-multiple-legacy'] = 'Устаревший список множественного выбора'; | |
$_lang['option'] = 'Переключатели (radio)'; |
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
Расширение любых таблиц MODX - https://modx.pro/solutions/7037-expanding-any-table-modx/ |
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
https://modx.pro/solutions/10040-add-your-fields-in-the-order-form/ | |
https://dart.agency/blog/modx/kak-dobavit-dopolnitelnoe-pole-k-zakazu-v-minishop2.html | |
https://modx.pro/solutions/7037-expanding-any-table-modx/#comment-84315 | |
Инструкция: | |
1)В системных настройках добавляем свои поля в ms2_order_address_fields | |
2)Создаём плагин на событие OnMODXInit для расширения модели БД | |
<?php | |
switch ($modx->event->name) { |
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
создаём плагин на событие - OnHandleRequest | |
<?php | |
if ($modx->event->name != "OnHandleRequest" || $modx->context->key == 'mgr') { | |
return; | |
} | |
if ($_SERVER['REQUEST_URI'] != '/') { | |
if(substr($_SERVER['REQUEST_URI'], -1) === '/'){ | |
$new_url = preg_replace("#/$#", "", $_SERVER['REQUEST_URI']); | |
$modx->sendRedirect('http://'.$_SERVER["SERVER_NAME"].$new_url,array('responseCode' => 'HTTP/1.1 301 Moved Permanently')); |
OlderNewer