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
/** | |
* Класс для фильтра | |
* | |
* @constructor | |
* @param {HTMLElement} form - Форма | |
*/ | |
var Filter = function(form) { | |
this.form = form; | |
this.button = form.find('.show-results-button'); | |
this.clearButton = form.find('.clear-button'); |
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
При генерации XML ярлыки товаров заменяются на оригинальные товары, при | |
этом происходит замена группы оригинального товара на группу ярлыка (тег | |
shop_group_id), а также подменяется значение свойства shortcut_id. Так | |
ведет себя контроллер сейчас, но только в том случае, если в выборке нет | |
ярлыков, ссылающихся на один и тот же товар. | |
Если же в одну группу добавить несколько ярлыков одного и того же товара, | |
то замена shop_group_id и shortcut_id выполнится только для одного ярлыка. | |
Остальные ярлыки будут представлены как оригинальные товары без замены | |
shop_group_id и shortcut_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
<?php | |
/* | |
* Управление ярлыками элементов информационной системы в отдельной вкладке | |
* | |
* В bootstrap.php: | |
* | |
// Управление ярлыками элементов информационной системы в отдельной вкладке | |
Core_Event::attach('Admin_Form_Action_Controller_Type_Edit.onBeforeExecute',array('Admin_Form_Observer_ShortcutsTab_Informationsystem', 'onBeforeExecute')); | |
Core_Event::attach('Admin_Form_Action_Controller_Type_Edit.onAfterRedeclaredPrepareForm', array('Admin_Form_Observer_ShortcutsTab_Informationsystem', 'onAfterRedeclaredPrepareForm')); |
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 | |
/* | |
* Получение координат объекта по адресу с помощью Яндекс.Карты API | |
* | |
* В bootstrap.php: | |
* | |
// Получение координат объекта по адресу с помощью Яндекс.Карты API | |
Core_Event::attach('property_value_text.onAfterSave', array('Kad_Informationsystem_Observer_GetCoordinates', 'onAfterAddressSave')); | |
Core_Event::attach('property_value_string.onAfterSave', array('Kad_Informationsystem_Observer_GetCoordinates', 'onAfterCoordinatesSave')); |
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 | |
// В импортируемом CSV-файле первым должен быть столбец с производителем, а вторым столбец с артикулом | |
/* | |
* В bootstrap.php: | |
* | |
// Поиск по артикулу и производителю при импорте CSV-файла | |
Core_Event::attach('ImportShopItems.onBeforeFindByMarking', array('Shop_Item_Import_Observer_SearchByProdAndVendor', 'onBeforeFindByMarking')); | |
Core_Event::attach('ImportShopItems.onAfterFindByMarking', array('Shop_Item_Import_Observer_SearchByProdAndVendor', 'onAfterFindByMarking')); |
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 | |
/** | |
* Модифицированный драйвер Imagick с конвертацией изображений в sRGB | |
* | |
*/ | |
class Core_Image_Imagicksrgb extends Core_Image | |
{ | |
static public function resizeImage(/* ... */) | |
{ |
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 Shop_Delivery_HandlerXXX extends Shop_Delivery_Handler | |
{ | |
/** | |
* Возврвщает список пунктов выдачи для заданных параметров доставки. | |
* |
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
// Передаем токен на сервер для запуска скрипта авторизации | |
$.ajax({ | |
method: 'POST', | |
url: '/ulogin/', | |
data: $.param({ | |
ajax: 1, | |
token: token | |
}), | |
success: function() { | |
// Обновляем страницу |
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 | |
/* | |
* В bootstrap.php: | |
// Установка значения свойства «Товары» равным названию группы товара | |
Core_Event::attach('shop_item.onAfterSave', array('Shop_Item_Observers_Updateshopitemtype', 'onAfterSave')); | |
* | |
*/ |