Skip to content

Commit

Permalink
Merge pull request #697 from modx-pro/3.0.5
Browse files Browse the repository at this point in the history
3.0.5
  • Loading branch information
biz87 committed Jun 17, 2022
2 parents 69b2035 + 16bf15e commit e8cb762
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion _build/build.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const PKG_NAME = 'miniShop2';
define('PKG_NAME_LOWER', strtolower(PKG_NAME));

const PKG_VERSION = '3.0.4';
const PKG_VERSION = '3.0.5';
const PKG_RELEASE = 'pl';
const PKG_AUTO_INSTALL = true;

Expand Down
14 changes: 12 additions & 2 deletions _build/resolvers/resolve.tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,21 @@
/** @var modX $modx */
if ($transport->xpdo) {
$modx = $transport->xpdo;

switch ($options[xPDOTransport::PACKAGE_ACTION]) {
case xPDOTransport::ACTION_INSTALL:
case xPDOTransport::ACTION_UPGRADE:
$modx->addPackage('minishop2', MODX_CORE_PATH . 'components/minishop2/model/');
if ($options[xPDOTransport::PACKAGE_ACTION] === xPDOTransport::ACTION_UPGRADE) {
/** @var miniShop2 $miniShop2 */
$miniShop2 = $modx->getService('minishop2', 'miniShop2', MODX_CORE_PATH . 'components/minishop2/');
if ($miniShop2->version < '3.0.5') {
$sql = "ALTER TABLE {$modx->getTableName('msOrder')} CHANGE COLUMN `comment` `order_comment` TEXT NULL";
$modx->exec($sql);
}
}
if ($options[xPDOTransport::PACKAGE_ACTION] === xPDOTransport::ACTION_INSTALL) {
$modx->addPackage('minishop2', MODX_CORE_PATH . 'components/minishop2/model/');
}

$manager = $modx->getManager();
$objects = [];
$schemaFile = MODX_CORE_PATH . 'components/minishop2/model/schema/minishop2.mysql.schema.xml';
Expand Down
2 changes: 1 addition & 1 deletion assets/components/minishop2/js/mgr/orders/orders.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ Ext.extend(miniShop2.window.UpdateOrder, miniShop2.window.Default, {
columnWidth: .5,
layout: 'form',
items: [
{xtype: 'textarea', name: 'comment', fieldLabel: _('ms2_comment'), anchor: '100%', height: 170}
{xtype: 'textarea', name: 'order_comment', fieldLabel: _('ms2_order_comment'), anchor: '100%', height: 170}
]
}]
}];
Expand Down
6 changes: 6 additions & 0 deletions core/components/minishop2/docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.0.5-pl] - 2022-06-16

### Changed
Fixed bug of linking order and address models
Fixed conflict of identical fields #696

## [3.0.4-pl] - 2022-06-09

### Added
Expand Down
1 change: 1 addition & 0 deletions core/components/minishop2/lexicon/en/manager.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
$_lang['ms2_floor'] = 'Floor';
$_lang['ms2_text_address'] = 'Address';
$_lang['ms2_comment'] = 'Comment';
$_lang['ms2_order_comment'] = 'Operator comment ';

$_lang['ms2_email_user'] = 'Email Customer';
$_lang['ms2_email_manager'] = 'Email Manager';
Expand Down
1 change: 1 addition & 0 deletions core/components/minishop2/lexicon/ru/manager.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
$_lang['ms2_floor'] = 'Этаж';
$_lang['ms2_text_address'] = 'Адрес одной строкой';
$_lang['ms2_comment'] = 'Комментарий';
$_lang['ms2_order_comment'] = 'Комментарий оператора';

$_lang['ms2_email_user'] = 'Письмо покупателю';
$_lang['ms2_email_manager'] = 'Письмо менеджеру';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
'payment' => 0,
'address' => 0,
'context' => 'web',
'comment' => null,
'order_comment' => null,
'properties' => null,
'type' => 0,
),
Expand Down Expand Up @@ -139,7 +139,7 @@
'null' => true,
'default' => 'web',
),
'comment' =>
'order_comment' =>
array(
'dbtype' => 'text',
'phptype' => 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
<field key="address" dbtype="int" precision="10" attributes="unsigned" phptype="integer" null="true"
default="0"/>
<field key="context" dbtype="varchar" precision="100" phptype="string" null="true" default="web"/>
<field key="comment" dbtype="text" phptype="string" null="true"/>
<field key="order_comment" dbtype="text" phptype="string" null="true"/>
<field key="properties" dbtype="text" phptype="json" null="true"/>
<field key="type" dbtype="tinyint" precision="3" phptype="integer" attributes="unsigned" null="true"
default="0"/>
Expand All @@ -281,7 +281,7 @@
<aggregate alias="Delivery" class="msDelivery" local="delivery" foreign="id" cardinality="one" owner="foreign"/>
<aggregate alias="Payment" class="msPayment" local="payment" foreign="id" cardinality="one" owner="foreign"/>
<composite alias="Address" class="msOrderAddress" local="address" foreign="id" cardinality="one"
owner="local"/>
owner="foreign"/>
<composite alias="Products" class="msOrderProduct" local="id" foreign="order_id" cardinality="many"
owner="local"/>
<composite alias="Log" class="msOrderLog" local="id" foreign="order_id" cardinality="many" owner="local"/>
Expand Down

0 comments on commit e8cb762

Please sign in to comment.