Skip to content

Commit

Permalink
6.23.0 (FINAL RELEASE)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2epro committed May 30, 2022
1 parent 15132ca commit ff76c2c
Show file tree
Hide file tree
Showing 19 changed files with 200 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ protected function getListingData()
$data = array_merge($this->getDefaultFieldsValues(), $data);
}

if (!empty($data['restock_date_value']) && strtotime($data['restock_date_value'])) {
if ($this->getRequest()->getParam('id') !== null && !empty($data['restock_date_value']) && strtotime($data['restock_date_value'])) {
$data['restock_date_value'] = Mage::helper('M2ePro')->gmtDateToTimezone($data['restock_date_value']);
}

Expand Down
7 changes: 6 additions & 1 deletion app/code/community/Ess/M2ePro/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
* 6.22.2 (27/05/2022)
* 6.23.0 (30/05/2022)

Common: [Added] Possibility to disable import of Ship by date to Magento orders [#3504]
Amazon: [Fixed] The time is offset according to the Magento time zone when the Restock Date is set to a Custom Value [#3533]

* 6.22.2 (27/05/2022)

eBay: [Fixed] Message "The Sell API token for eBay Account expires. You need to generate a new access token to reauthorize M2E Pro" after the upgrade to v6.22.1 [#3648]

Expand Down
12 changes: 12 additions & 0 deletions app/code/community/Ess/M2ePro/Model/Amazon/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,18 @@ public function isOtherListingsMappingEnabled()
return $this->getOtherListingsMappingMode() == 1;
}

/**
* @return bool
*/
public function isImportShipByDateToMagentoOrder()
{
return (bool)$this->getSetting(
'magento_orders_settings',
array('shipping_information', 'ship_by_date'),
true
);
}

// ---------------------------------------

/**
Expand Down
13 changes: 11 additions & 2 deletions app/code/community/Ess/M2ePro/Model/Amazon/Account/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,13 @@ protected function prepareData()
}
}

$data['magento_orders_settings'] = Mage::helper('M2ePro')->jsonEncode($data['magento_orders_settings']);
$data['magento_orders_settings']['shipping_information']['ship_by_date']
= isset($this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date'])
? (int)$this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date']
: 1;

$data['magento_orders_settings'] = Mage::helper('M2ePro')
->jsonEncode($data['magento_orders_settings']);

// tab: vat calculation service
// ---------------------------------------
Expand Down Expand Up @@ -404,7 +410,10 @@ public function getDefaultData()
'store_mode' => 0,
'store_id' => null,
'stock_mode' => 0
)
),
'shipping_information' => array(
'ship_by_date' => 1,
),
),

// vcs_upload_invoices
Expand Down
7 changes: 6 additions & 1 deletion app/code/community/Ess/M2ePro/Model/Amazon/Order/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ public function getShippingData()
}
}

if ($shippingDateTo = $this->_order->getShippingDateTo()) {
$shippingDateTo = $this->_order->getShippingDateTo();
$isImportShipByDate = $this->_order
->getAmazonAccount()
->isImportShipByDateToMagentoOrder();

if ($shippingDateTo && $isImportShipByDate) {
$additionalData .= 'Ship By Date: '
. Mage::helper('core')->formatDate($shippingDateTo, 'medium', true)
. ' | ';
Expand Down
12 changes: 12 additions & 0 deletions app/code/community/Ess/M2ePro/Model/Ebay/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,18 @@ public function isModeSandbox()
return $this->getMode() == self::MODE_SANDBOX;
}

/**
* @return bool
*/
public function isImportShipByDateToMagentoOrder()
{
return (bool)$this->getSetting(
'magento_orders_settings',
array('shipping_information', 'ship_by_date'),
true
);
}

// ---------------------------------------

/**
Expand Down
11 changes: 10 additions & 1 deletion app/code/community/Ess/M2ePro/Model/Ebay/Account/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,13 @@ protected function prepareData()
}
}

$data['magento_orders_settings'] = Mage::helper('M2ePro')->jsonEncode($data['magento_orders_settings']);
$data['magento_orders_settings']['shipping_information']['ship_by_date']
= isset($this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date'])
? (int)$this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date']
: 1;

$data['magento_orders_settings'] = Mage::helper('M2ePro')
->jsonEncode($data['magento_orders_settings']);

// tab invoice and shipment
// ---------------------------------------
Expand Down Expand Up @@ -422,6 +428,9 @@ public function getDefaultData()
'refund_and_cancellation' => array(
'refund_mode' => 0,
),
'shipping_information' => array(
'ship_by_date' => 1,
),
),

'create_magento_invoice' => 1,
Expand Down
7 changes: 6 additions & 1 deletion app/code/community/Ess/M2ePro/Model/Ebay/Order/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,12 @@ public function getShippingData()
}
}

if ($shippingDateTo = $this->_order->getShippingDateTo()) {
$shippingDateTo = $this->_order->getShippingDateTo();
$isImportShipByDate = $this->_order
->getEbayAccount()
->isImportShipByDateToMagentoOrder();

if ($shippingDateTo && $isImportShipByDate) {
$additionalData .= 'Ship By Date: '
. Mage::helper('core')->formatDate($shippingDateTo, 'medium', true)
. ' | ';
Expand Down
12 changes: 12 additions & 0 deletions app/code/community/Ess/M2ePro/Model/Walmart/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,18 @@ public function isOtherListingsMappingEnabled()
return $this->getOtherListingsMappingMode() == 1;
}

/**
* @return bool
*/
public function isImportShipByDateToMagentoOrder()
{
return (bool)$this->getSetting(
'magento_orders_settings',
array('shipping_information', 'ship_by_date'),
true
);
}

// ---------------------------------------

/**
Expand Down
11 changes: 10 additions & 1 deletion app/code/community/Ess/M2ePro/Model/Walmart/Account/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@ protected function prepareData()
}
}

$data['magento_orders_settings'] = Mage::helper('M2ePro')->jsonEncode($data['magento_orders_settings']);
$data['magento_orders_settings']['shipping_information']['ship_by_date']
= isset($this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date'])
? (int)$this->_rawData['magento_orders_settings']['shipping_information']['ship_by_date']
: 1;

$data['magento_orders_settings'] = Mage::helper('M2ePro')
->jsonEncode($data['magento_orders_settings']);

// tab invoice and shipment
// ---------------------------------------
Expand Down Expand Up @@ -367,6 +373,9 @@ public function getDefaultData()
'refund_and_cancellation' => array(
'refund_mode' => 1,
),
'shipping_information' => array(
'ship_by_date' => 1,
),
),
'create_magento_invoice' => 1,
'create_magento_shipment' => 1,
Expand Down
7 changes: 6 additions & 1 deletion app/code/community/Ess/M2ePro/Model/Walmart/Order/Proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ public function getShippingData()
{
$additionalData = '';

if ($shippingDateTo = $this->_order->getShippingDateTo()) {
$shippingDateTo = $this->_order->getShippingDateTo();
$isImportShipByDate = $this->_order
->getWalmartAccount()
->isImportShipByDateToMagentoOrder();

if ($shippingDateTo && $isImportShipByDate) {
$additionalData .= 'Ship By Date: '
. Mage::helper('core')->formatDate($shippingDateTo, 'medium', true)
. ' | ';
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Ess/M2ePro/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "m2epro/magento1-extension",
"description": "M2E Pro is a Magento trusted (TM), award-winning extension, which allows merchants of all sizes to fully integrate Magento based system(s) into eBay/Amazon/Walmart platforms.",
"type": "magento-module",
"version": "6.22.2",
"version": "6.23.0",
"license": "proprietary",
"keywords": ["ebay", "amazon", "walmart", "magento"],
"homepage": "https://www.m2epro.com/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ protected function createListing()
if ($this->getSessionValue('restock_date_value') === '') {
$data['restock_date_value'] = Mage::helper('M2ePro')->getCurrentGmtDate();
} else {
$data['restock_date_value'] = Mage::helper('M2ePro')->gmtDateToTimezone(
$data['restock_date_value'] = Mage::helper('M2ePro')->timezoneDateToGmt(
$this->getSessionValue('restock_date_value')
);
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Ess/M2ePro/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Ess_M2ePro>
<version>6.22.2</version>
<version>6.23.0</version>
</Ess_M2ePro>
</modules>
<default>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/*
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/

class Ess_M2ePro_Sql_Upgrade_v6_22_2__v6_23_0_Config extends Ess_M2ePro_Model_Upgrade_Feature_AbstractConfig
{
public function getFeaturesList()
{
return array();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,35 @@

</div>

<div class="entry-edit" id="magento_block_amazon_accounts_magento_orders_shipping_information">

<div class="entry-edit-head">
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('M2ePro')->__('Shipping information'); ?></h4>
</div>

<div class="fieldset">
<div class="hor-scroll">

<table class="form-list" cellspacing="0" cellpadding="0">

<tr>
<td class="label">
<label for="magento_orders_shipping_information_ship_by_date"><?php echo Mage::helper('M2ePro')->__('Import Ship by date to Magento order'); ?>: </label>
</td>
<td class="value" style="width: auto;">
<select id="magento_orders_shipping_information_ship_by_date" name="magento_orders_settings[shipping_information][ship_by_date]" class="M2ePro-required-when-visible">
<option value="1" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 1) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('Yes'); ?></option>
<option value="0" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 0) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('No'); ?></option>
</select>
</td>
</tr>

</table>

</div>
</div>

</div>

<div class="entry-edit" id="magento_block_amazon_accounts_magento_orders_number" <?php if(($formData['magento_orders_settings']['listing']['mode'] == 0 && $formData['magento_orders_settings']['listing_other']['mode'] == 0)) echo 'style="display: none;"'; ?>>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,36 @@

</div>

<div class="entry-edit" id="magento_block_ebay_accounts_magento_orders_shipping_information">

<div class="entry-edit-head">
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('M2ePro')->__('Shipping information'); ?></h4>
</div>

<div class="fieldset">
<div class="hor-scroll">

<table class="form-list" cellspacing="0" cellpadding="0">

<tr>
<td class="label">
<label for="magento_orders_shipping_information_ship_by_date"><?php echo Mage::helper('M2ePro')->__('Import Ship by date to Magento order'); ?>: </label>
</td>
<td class="value" style="width: auto;">
<select id="magento_orders_shipping_information_ship_by_date" name="magento_orders_settings[shipping_information][ship_by_date]" class="M2ePro-required-when-visible">
<option value="1" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 1) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('Yes'); ?></option>
<option value="0" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 0) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('No'); ?></option>
</select>
</td>
</tr>

</table>

</div>
</div>

</div>

<div class="entry-edit" id="magento_block_ebay_accounts_magento_orders_customer" <?php if(($formData['magento_orders_settings']['listing']['mode'] == 0 && $formData['magento_orders_settings']['listing_other']['mode'] == 0)) echo 'style="display: none;"'; ?>>

<div class="entry-edit-head">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,36 @@

</div>

<div class="entry-edit" id="magento_block_walmart_accounts_magento_orders_shipping_information">

<div class="entry-edit-head">
<h4 class="icon-head head-edit-form fieldset-legend"><?php echo Mage::helper('M2ePro')->__('Shipping information'); ?></h4>
</div>

<div class="fieldset">
<div class="hor-scroll">

<table class="form-list" cellspacing="0" cellpadding="0">

<tr>
<td class="label">
<label for="magento_orders_shipping_information_ship_by_date"><?php echo Mage::helper('M2ePro')->__('Import Ship by date to Magento order'); ?>: </label>
</td>
<td class="value" style="width: auto;">
<select id="magento_orders_shipping_information_ship_by_date" name="magento_orders_settings[shipping_information][ship_by_date]" class="M2ePro-required-when-visible">
<option value="1" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 1) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('Yes'); ?></option>
<option value="0" <?php if ($formData['magento_orders_settings']['shipping_information']['ship_by_date'] == 0) echo ' selected="selected"'; ?>><?php echo Mage::helper('M2ePro')->__('No'); ?></option>
</select>
</td>
</tr>

</table>

</div>
</div>

</div>

<div class="entry-edit" id="magento_block_walmart_accounts_magento_orders_number" <?php if(($formData['magento_orders_settings']['listing']['mode'] == 0 && $formData['magento_orders_settings']['listing_other']['mode'] == 0)) echo 'style="display: none;"'; ?>>

<div class="entry-edit-head">
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "m2epro/magento1-extension",
"description": "M2E Pro is a Magento trusted (TM), award-winning extension, which allows merchants of all sizes to fully integrate Magento based system(s) into eBay/Amazon/Walmart platforms.",
"type": "magento-module",
"version": "6.22.2",
"version": "6.23.0",
"license": "proprietary",
"keywords": ["ebay", "amazon", "walmart", "magento"],
"homepage": "https://www.m2epro.com/",
Expand Down

0 comments on commit ff76c2c

Please sign in to comment.