Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _build/resolvers/resolver_01_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'service_url' => 'modstore.pro',
],
'VueTools' => [
'version' => '1.0.0-beta1',
'version' => '1.1.3-pl',
'service_url' => 'modstore.pro',
],
];
Expand Down
6 changes: 4 additions & 2 deletions assets/components/minishop3/css/mgr/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,8 @@ a.x-menu-item .x-menu-item-text .icon {
box-sizing: border-box !important;
}

.p-select-filter {
width: 90% !important;
/* Select filter must fill IconField (was 90% — left a dead strip and misaligned search icon). */
.p-select-overlay .p-select-filter,
.p-multiselect-overlay .p-multiselect-filter {
width: 100% !important;
}
11 changes: 8 additions & 3 deletions assets/components/minishop3/js/mgr/category/update.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,17 @@ Ext.extend(ms3.panel.UpdateCategory, ms3.panel.Category, {
return [{
layout: 'form',
items: [items, {
html: String.format('<h3>{0}</h3>', _('ms3_product_options')),
style: 'margin-top: 20px',
html: String.format(
'<h3 class="ms3-category-options-heading">{0}</h3>',
_('ms3_product_options')
),
// Theme panel step (15px) above the section; heading→toolbar gap via CSS.
style: 'margin-top: 15px',
border: false,
}, {
xtype: 'container',
cls: 'main-wrapper',
// Avoid .main-wrapper (15px pad) stacking on h3 margin — doubles title→toolbar gap.
style: 'padding: 0',
html: '<div id="ms3-vue-category-options" class="vueApp" data-category-id="' + categoryId + '"></div>',
}]
}];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public function loadCustomCssJs()

// Vue modules with VueTools dependency check
$this->addCss($assetsUrl . 'css/mgr/vue-dist/primeicons.min.css');
$this->addCss($assetsUrl . 'css/mgr/vue-dist/ActionsColumn.min.css');
$this->addCss($assetsUrl . 'css/mgr/vue-dist/category-products.min.css');
$this->addCss($assetsUrl . 'css/mgr/vue-dist/category-options.min.css');
$this->addVueModule($assetsUrl . 'js/mgr/vue-dist/category-products.min.js');
Expand Down
4 changes: 2 additions & 2 deletions core/components/minishop3/controllers/manager.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public function addVueModule($src)
self::$vueCoreCheckRegistered = true;
}

// Add version to URL
$src = $src . '?v=' . $this->ms3->version;
require_once __DIR__ . '/vue_module_cache_bust.inc.php';
$src = ms3_vue_module_cache_bust_url($this->modx, $src, (string) $this->ms3->version);

// Register the module (will be blocked by check if VueCore not installed)
$this->modx->regClientStartupHTMLBlock(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public function addVueModule($src)
self::$vueCoreCheckRegistered = true;
}

// Add version to URL
$src = $src . '?v=' . $this->ms3->version;
require_once __DIR__ . '/vue_module_cache_bust.inc.php';
$src = ms3_vue_module_cache_bust_url($this->modx, $src, (string) $this->ms3->version);

// Register the module (will be blocked by check if VueCore not installed)
$this->modx->regClientStartupHTMLBlock(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public function addVueModule($src)
self::$vueCoreCheckRegistered = true;
}

// Add version to URL
$src = $src . '?v=' . $this->ms3->version;
require_once __DIR__ . '/vue_module_cache_bust.inc.php';
$src = ms3_vue_module_cache_bust_url($this->modx, $src, (string) $this->ms3->version);

// Register the module (will be blocked by check if VueCore not installed)
$this->modx->regClientStartupHTMLBlock(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* Append cache-bust query to a Vue module URL.
*
* Package version alone does not change when an Extra rebuilds vue-dist, so
* HTTP caches keep stale plugin tabs (Aura theme, size=small buttons, etc.).
* When the URL maps under assets_path, filemtime is mixed into `v=`.
*/
function ms3_vue_module_cache_bust_url($modx, string $src, string $packageVersion): string
{
$version = $packageVersion;
$path = parse_url($src, PHP_URL_PATH);
if (is_string($path) && $path !== '') {
$assetsUrl = rtrim((string) $modx->getOption('assets_url'), '/');
$assetsPath = rtrim((string) $modx->getOption('assets_path'), '/');
$fsPath = null;
if ($assetsUrl !== '' && str_starts_with($path, $assetsUrl)) {
$fsPath = $assetsPath . substr($path, strlen($assetsUrl));
} elseif (defined('MODX_ASSETS_PATH') && str_starts_with($path, '/assets/')) {
$fsPath = rtrim(MODX_ASSETS_PATH, '/') . substr($path, strlen('/assets'));
}
if (is_string($fsPath) && is_file($fsPath)) {
$version .= '.' . filemtime($fsPath);
}
}

$separator = str_contains($src, '?') ? '&' : '?';

return $src . $separator . 'v=' . rawurlencode($version);
}
10 changes: 6 additions & 4 deletions core/components/minishop3/lexicon/en/help.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$_lang['ms3_components_href'] = 'https://modstore.pro/';
$_lang['ms3_components_text'] = 'Paid and free addons';
$_lang['ms3_components_title'] = 'Addons';
$_lang['ms3_demo_href'] = '#';
$_lang['ms3_demo_href'] = 'https://minishop3.ru/';
$_lang['ms3_demo_text'] = 'Go to demo site';
$_lang['ms3_demo_title'] = 'Demo';
$_lang['ms3_docs_href'] = 'https://docs.modx.pro/components/minishop3/';
Expand All @@ -24,9 +24,11 @@
$_lang['ms3_github_text'] = 'Found an issue? Report it!';
$_lang['ms3_github_title'] = 'github.com';
$_lang['ms3_help'] = 'Help and support';
$_lang['ms3_help_nav_title'] = 'Manager sections';
$_lang['ms3_help_resources_title'] = 'Resources';
$_lang['ms3_help_text'] = 'MiniShop3 - the most flexible and fast e-commerce component for MODX3.';
$_lang['ms3_help_text_support'] = '<strong>You can support MiniShop3 financially:</strong>
<br>- All details <a href="https://modx.pro/about" target="_blank">here</a>';
$_lang['ms3_help_text_support'] = '<strong>Support MiniShop3 development</strong>
<br>Payment details are on the <a href="https://modx.pro/about" target="_blank" rel="noopener noreferrer">about page</a>.';
$_lang['ms3_lexicons_href'] = '?a=workspaces/lexicon&ns=minishop3';
$_lang['ms3_lexicons_text'] = 'Lexicon management';
$_lang['ms3_localization_href'] = 'https://crowdin.com/project/minishop3-ecommerce';
Expand All @@ -41,6 +43,6 @@
$_lang['ms3_settings_href'] = '?a=mgr/settings&namespace=minishop3';
$_lang['ms3_settings_text'] = 'Settings';
$_lang['ms3_sys_settings_href'] = '?a=system/settings&ns=minishop3';
$_lang['ms3_sys_settings_text'] = 'System settings & Events';
$_lang['ms3_sys_settings_text'] = 'System settings';
$_lang['ms3_utilities_href'] = '?a=mgr/utilities&namespace=minishop3';
$_lang['ms3_utilities_text'] = 'Utilities';
14 changes: 14 additions & 0 deletions core/components/minishop3/lexicon/en/product.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
$_lang['ms3_gallery_file_source'] = 'File Source';

$_lang['ms3_gallery_button_upload'] = 'Select Files';
$_lang['ms3_gallery_actions'] = 'Gallery actions';

$_lang['ms3_gallery_file_show'] = 'Open in New Window';
$_lang['ms3_gallery_file_update'] = 'Edit Properties';
Expand Down Expand Up @@ -184,13 +185,26 @@
$_lang['ms3_gallery_uppy_note_max_size'] = 'Maximum size: %{maxSize}';
$_lang['ms3_gallery_uppy_back'] = 'Back';
$_lang['ms3_gallery_uppy_add_more_files'] = 'Add more files';
$_lang['ms3_gallery_uppy_adding_more_files'] = 'Adding more files';
$_lang['ms3_gallery_uppy_drop_hint'] = 'Drop your files here';
$_lang['ms3_gallery_uppy_error'] = 'Error';
$_lang['ms3_gallery_uppy_failed_to_upload'] = 'Failed to upload %{file}';
$_lang['ms3_gallery_uppy_no_duplicates'] = 'Cannot add the duplicate file \'%{fileName}\', it already exists';
$_lang['ms3_gallery_uppy_no_files_found'] = 'You have no files or folders here';
$_lang['ms3_gallery_uppy_pause_upload'] = 'Pause upload';
$_lang['ms3_gallery_uppy_resume_upload'] = 'Resume upload';
$_lang['ms3_gallery_uppy_editing'] = 'Editing image';
$_lang['ms3_gallery_uppy_save'] = 'Save';
$_lang['ms3_gallery_uppy_finish_editing'] = 'Finish editing';
$_lang['ms3_gallery_uppy_save_changes'] = 'Save changes';
$_lang['ms3_gallery_uppy_revert'] = 'Reset';
$_lang['ms3_gallery_uppy_rotate'] = 'Rotate 90°';
$_lang['ms3_gallery_uppy_zoom_in'] = 'Zoom in';
$_lang['ms3_gallery_uppy_zoom_out'] = 'Zoom out';
$_lang['ms3_gallery_uppy_flip_horizontal'] = 'Flip horizontally';
$_lang['ms3_gallery_uppy_crop_square'] = 'Crop square';
$_lang['ms3_gallery_uppy_crop_landscape'] = 'Crop landscape (16:9)';
$_lang['ms3_gallery_uppy_crop_portrait'] = 'Crop portrait (9:16)';

$_lang['ms3_gallery_search_placeholder'] = 'Search files...';
$_lang['ms3_gallery_empty_text'] = 'No images yet. Upload files using the area above.';
Expand Down
18 changes: 18 additions & 0 deletions core/components/minishop3/lexicon/en/vue.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
$_lang['ms3_vue_product_fields_title'] = 'Product Fields (Admin)';
$_lang['ms3_vue_product_fields_description'] = 'Here you can configure which fields are displayed on the "Product Data" tab when editing a product';
$_lang['ms3_vue_product_properties'] = 'Product Properties';
$_lang['ms3_product_links_empty'] = 'No links yet. Create the first one.';

// Grid Fields Config Widget
$_lang['grid_fields_config_title'] = 'Grid Configuration';
Expand Down Expand Up @@ -639,6 +640,19 @@
$_lang['log_action'] = 'Action';
$_lang['log_user'] = 'User';
$_lang['log_entry'] = 'Entry';
$_lang['log_empty'] = 'No order history yet';
$_lang['log_action_status'] = 'Status';
$_lang['log_action_field'] = 'Field';
$_lang['log_action_address'] = 'Address';
$_lang['log_action_products'] = 'Products';
$_lang['log_action_payment'] = 'Payment';
$_lang['log_entry_status_id'] = 'Status ID: {id}';
$_lang['log_entry_fields'] = 'Fields: {fields}';
$_lang['log_entry_address'] = 'Address: {fields}';
$_lang['log_entry_product_op_add'] = 'Added';
$_lang['log_entry_product_op_remove'] = 'Removed';
$_lang['log_entry_product_op_update'] = 'Updated';
$_lang['log_entry_product_op_unknown'] = 'Change';
$_lang['address_first_name'] = 'First Name';
$_lang['address_last_name'] = 'Last Name';
$_lang['address_phone'] = 'Phone';
Expand Down Expand Up @@ -1127,6 +1141,10 @@
$_lang['ms3_vendor_email'] = 'Email';
$_lang['ms3_vendor_description'] = 'Description';
$_lang['ms3_vendor_properties'] = 'Properties';
$_lang['ms3_vendor_select'] = 'Select vendor';
$_lang['ms3_vendor_search'] = 'Search vendor…';
$_lang['ms3_vendor_empty'] = 'No vendors found. Add a vendor in component settings.';
$_lang['ms3_vendor_not_found'] = 'Vendor not found';

// Vendor sections
$_lang['ms3_section_vendor_info'] = 'Information';
Expand Down
10 changes: 6 additions & 4 deletions core/components/minishop3/lexicon/ru/help.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
$_lang['ms3_components_href'] = 'https://modstore.pro/';
$_lang['ms3_components_text'] = 'Платные и бесплатные дополнения';
$_lang['ms3_components_title'] = 'Дополнения';
$_lang['ms3_demo_href'] = '#';
$_lang['ms3_demo_href'] = 'https://minishop3.ru/';
$_lang['ms3_demo_text'] = 'Перейти на демо-сайт';
$_lang['ms3_demo_title'] = 'Демо';
$_lang['ms3_docs_href'] = 'https://docs.modx.pro/components/minishop3/';
Expand All @@ -24,9 +24,11 @@
$_lang['ms3_github_text'] = 'Нашли проблему? Сообщите об этом!';
$_lang['ms3_github_title'] = 'github.com';
$_lang['ms3_help'] = 'Помощь и поддержка';
$_lang['ms3_help_nav_title'] = 'Разделы менеджера';
$_lang['ms3_help_resources_title'] = 'Ресурсы';
$_lang['ms3_help_text'] = 'MiniShop3 - самый гибкий и быстрый компонент интернет-магазина для MODX3.';
$_lang['ms3_help_text_support'] = '<strong>Вы можете поддержать MiniShop3 финансово:</strong>
<br>- Все реквизиты <a href="https://modx.pro/about" target="_blank">здесь</a>';
$_lang['ms3_help_text_support'] = '<strong>Поддержите разработку MiniShop3</strong>
<br>Реквизиты для перевода — на <a href="https://modx.pro/about" target="_blank" rel="noopener noreferrer">странице о проекте</a>.';
$_lang['ms3_lexicons_href'] = '?a=workspaces/lexicon&ns=minishop3';
$_lang['ms3_lexicons_text'] = 'Управление словарями';
$_lang['ms3_localization_href'] = 'https://crowdin.com/project/minishop3-ecommerce';
Expand All @@ -41,6 +43,6 @@
$_lang['ms3_settings_href'] = '?a=mgr/settings&namespace=minishop3';
$_lang['ms3_settings_text'] = 'Настройки';
$_lang['ms3_sys_settings_href'] = '?a=system/settings&ns=minishop3';
$_lang['ms3_sys_settings_text'] = 'Системные настройки & События';
$_lang['ms3_sys_settings_text'] = 'Системные настройки';
$_lang['ms3_utilities_href'] = '?a=mgr/utilities&namespace=minishop3';
$_lang['ms3_utilities_text'] = 'Утилиты';
14 changes: 14 additions & 0 deletions core/components/minishop3/lexicon/ru/product.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
$_lang['ms3_gallery_file_source'] = 'Источник файла';

$_lang['ms3_gallery_button_upload'] = 'Выбрать файлы';
$_lang['ms3_gallery_actions'] = 'Действия галереи';

$_lang['ms3_gallery_file_show'] = 'Открыть в новом окне';
$_lang['ms3_gallery_file_update'] = 'Изменить свойства';
Expand Down Expand Up @@ -184,13 +185,26 @@
$_lang['ms3_gallery_uppy_note_max_size'] = 'Макс. размер: %{maxSize}';
$_lang['ms3_gallery_uppy_back'] = 'Назад';
$_lang['ms3_gallery_uppy_add_more_files'] = 'Добавить ещё файлы';
$_lang['ms3_gallery_uppy_adding_more_files'] = 'Добавление файлов';
$_lang['ms3_gallery_uppy_drop_hint'] = 'Перетащите файлы сюда';
$_lang['ms3_gallery_uppy_error'] = 'Ошибка';
$_lang['ms3_gallery_uppy_failed_to_upload'] = 'Не удалось загрузить %{file}';
$_lang['ms3_gallery_uppy_no_duplicates'] = 'Нельзя добавить дубликат файла \'%{fileName}\', он уже существует';
$_lang['ms3_gallery_uppy_no_files_found'] = 'У вас нет файлов или папок';
$_lang['ms3_gallery_uppy_pause_upload'] = 'Приостановить загрузку';
$_lang['ms3_gallery_uppy_resume_upload'] = 'Возобновить загрузку';
$_lang['ms3_gallery_uppy_editing'] = 'Редактирование изображения';
$_lang['ms3_gallery_uppy_save'] = 'Сохранить';
$_lang['ms3_gallery_uppy_finish_editing'] = 'Завершить редактирование';
$_lang['ms3_gallery_uppy_save_changes'] = 'Сохранить изменения';
$_lang['ms3_gallery_uppy_revert'] = 'Сбросить';
$_lang['ms3_gallery_uppy_rotate'] = 'Повернуть на 90°';
$_lang['ms3_gallery_uppy_zoom_in'] = 'Увеличить';
$_lang['ms3_gallery_uppy_zoom_out'] = 'Уменьшить';
$_lang['ms3_gallery_uppy_flip_horizontal'] = 'Отразить по горизонтали';
$_lang['ms3_gallery_uppy_crop_square'] = 'Квадратная обрезка';
$_lang['ms3_gallery_uppy_crop_landscape'] = 'Альбомная обрезка (16:9)';
$_lang['ms3_gallery_uppy_crop_portrait'] = 'Портретная обрезка (9:16)';

$_lang['ms3_gallery_search_placeholder'] = 'Поиск файлов...';
$_lang['ms3_gallery_empty_text'] = 'Файлов нет. Загрузите через область выше.';
Expand Down
18 changes: 18 additions & 0 deletions core/components/minishop3/lexicon/ru/vue.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
$_lang['ms3_vue_product_fields_title'] = 'Поля товара (админка)';
$_lang['ms3_vue_product_fields_description'] = 'Здесь вы можете настроить, какие поля отображаются на вкладке "Данные товара" при редактировании товара';
$_lang['ms3_vue_product_properties'] = 'Свойства товара';
$_lang['ms3_product_links_empty'] = 'Связей пока нет. Создайте первую.';

// Grid Fields Config Widget
$_lang['grid_fields_config_title'] = 'Конфигурация гридов';
Expand Down Expand Up @@ -638,6 +639,19 @@
$_lang['log_action'] = 'Действие';
$_lang['log_user'] = 'Пользователь';
$_lang['log_entry'] = 'Запись';
$_lang['log_empty'] = 'История заказа пуста';
$_lang['log_action_status'] = 'Статус';
$_lang['log_action_field'] = 'Поле';
$_lang['log_action_address'] = 'Адрес';
$_lang['log_action_products'] = 'Товары';
$_lang['log_action_payment'] = 'Оплата';
$_lang['log_entry_status_id'] = 'Статус ID: {id}';
$_lang['log_entry_fields'] = 'Поля: {fields}';
$_lang['log_entry_address'] = 'Адрес: {fields}';
$_lang['log_entry_product_op_add'] = 'Добавлен';
$_lang['log_entry_product_op_remove'] = 'Удалён';
$_lang['log_entry_product_op_update'] = 'Изменён';
$_lang['log_entry_product_op_unknown'] = 'Изменение';
$_lang['address_first_name'] = 'Имя';
$_lang['address_last_name'] = 'Фамилия';
$_lang['address_phone'] = 'Телефон';
Expand Down Expand Up @@ -1129,6 +1143,10 @@
$_lang['ms3_vendor_email'] = 'Email';
$_lang['ms3_vendor_description'] = 'Описание';
$_lang['ms3_vendor_properties'] = 'Свойства';
$_lang['ms3_vendor_select'] = 'Выберите производителя';
$_lang['ms3_vendor_search'] = 'Поиск производителя…';
$_lang['ms3_vendor_empty'] = 'Производители не найдены. Добавьте производителя в настройках компонента.';
$_lang['ms3_vendor_not_found'] = 'Производитель не найден';

// Vendor sections
$_lang['ms3_section_vendor_info'] = 'Информация';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -772,8 +772,8 @@ protected function getDefaultFilters(): array
'label' => 'published',
'placeholder' => 'all',
'options' => [
['label' => 'Да', 'value' => 1],
['label' => 'Нет', 'value' => 0],
['label' => 'yes', 'value' => 1],
['label' => 'no', 'value' => 0],
],
'width' => '120px',
'position' => 20,
Expand Down
2 changes: 1 addition & 1 deletion core/components/minishop3/templates/default/customers.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="x-panel-body">
<div id="ms3-customers-vue-wrapper" class="vueApp" style="padding: 20px; height: 100%;"></div>
<div id="ms3-customers-vue-wrapper" class="vueApp" style="height: 100%;"></div>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="x-panel-body">
<div id="ms3-notifications-vue-wrapper" class="vueApp" style="padding: 20px; height: 100%;"></div>
<div id="ms3-notifications-vue-wrapper" class="vueApp" style="height: 100%;"></div>
</div>
2 changes: 1 addition & 1 deletion core/components/minishop3/templates/default/order.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="x-panel-body">
<div id="ms3-order-vue-wrapper" class="vueApp" style="padding: 20px; height: 100%;"></div>
<div id="ms3-order-vue-wrapper" class="vueApp" style="height: 100%;"></div>
</div>
2 changes: 1 addition & 1 deletion core/components/minishop3/templates/default/orders.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="x-panel-body">
<div id="ms3-orders-vue-wrapper" class="vueApp" style="padding: 20px; height: 100%;"></div>
<div id="ms3-orders-vue-wrapper" class="vueApp" style="height: 100%;"></div>
</div>
Loading