Skip to content

Commit

Permalink
1.67.1 (FINAL RELEASE)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2epro committed Sep 23, 2024
1 parent 9276f12 commit 0d3713a
Show file tree
Hide file tree
Showing 31 changed files with 116 additions and 246 deletions.
15 changes: 15 additions & 0 deletions Block/Adminhtml/Amazon/Account/Edit/Tabs/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,21 @@ protected function _prepareForm()
]
);

$fieldset->addField(
'magento_orders_customer_import_buyer_company_name',
'select',
[
'container_id' => 'magento_orders_customer_import_buyer_company_name_container',
'name' => 'magento_orders_settings[customer][import_buyer_company_name]',
'label' => __('Import Buyer Company Name for B2B Orders'),
'values' => [
0 => __('No'),
1 => __('Yes'),
],
'value' => $formData['magento_orders_settings']['customer']['import_buyer_company_name'],
]
);

$fieldset = $form->addFieldset(
'magento_block_amazon_accounts_magento_orders_tax',
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ protected function getComponentMode()

protected function getExcludedActionTitles()
{
return [
\Ess\M2ePro\Model\Listing\Log::ACTION_RESET_BLOCKED_PRODUCT => '',
];
return [];
}

//########################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ protected function getComponentMode()

protected function getExcludedActionTitles()
{
return [
\Ess\M2ePro\Model\Listing\Log::ACTION_RESET_BLOCKED_PRODUCT => '',
];
return [];
}

//########################################
Expand Down
22 changes: 0 additions & 22 deletions Block/Adminhtml/Ebay/Account/Edit/Tabs/InvoicesAndShipments.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,6 @@ protected function _prepareForm()
]
);

$fieldset->addField(
'skip_evtin',
'select',
[
'label' => $this->__('Skip eVTN'),
'title' => $this->__('Skip eVTN'),
'name' => 'skip_evtin',
'options' => [
0 => $this->__('No'),
1 => $this->__('Yes'),
],
'tooltip' => (string) __(
<<<HTML
Set <b>Yes</b> if you want to exclude
<a href="%1" target="_blank">eVTN</a> from your Magento orders.
HTML
,
'https://help.m2epro.com/support/solutions/articles/9000199785'
),
]
);

$form->setValues($formData);

$form->setUseContainer(false);
Expand Down
20 changes: 20 additions & 0 deletions Block/Adminhtml/Ebay/Account/Edit/Tabs/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,26 @@ protected function _prepareForm()
]
);

$shipByDateFieldset->addField(
'skip_evtin',
'select',
[
'label' => __('Skip eVTN'),
'title' => __('Skip eVTN'),
'name' => 'skip_evtin',
'options' => [
0 => __('No'),
1 => __('Yes'),
],
'value' => $formData['skip_evtin'],
'tooltip' => __(
'Set <b>Yes</b> if you want to exclude
<a href="%url" target="_blank">eVTN</a> from your Magento orders.',
['url' => 'https://help.m2epro.com/support/solutions/articles/9000199785']
),
]
);

$fieldset = $form->addFieldset(
'magento_block_ebay_accounts_magento_orders_customer',
[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ protected function getExcludedActionTitles()
\Ess\M2ePro\Model\Listing\Log::ACTION_SWITCH_TO_AFN_ON_COMPONENT => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_SWITCH_TO_MFN_ON_COMPONENT => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_CHANGE_PRODUCT_TIER_PRICE => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_RESET_BLOCKED_PRODUCT => '',
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ protected function getExcludedActionTitles()
\Ess\M2ePro\Model\Listing\Log::ACTION_SWITCH_TO_AFN_ON_COMPONENT => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_SWITCH_TO_MFN_ON_COMPONENT => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_CHANGE_PRODUCT_TIER_PRICE => '',
\Ess\M2ePro\Model\Listing\Log::ACTION_RESET_BLOCKED_PRODUCT => '',
];
}

Expand Down
7 changes: 6 additions & 1 deletion Block/Adminhtml/Ebay/Order/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,12 @@ protected function callbackFilterBuyer($collection, $column)

$collection
->getSelect()
->where('buyer_email LIKE ? OR buyer_user_id LIKE ? OR buyer_name LIKE ?', '%' . $value . '%');
->where(
'second_table.buyer_email LIKE ?
OR second_table.buyer_user_id LIKE ?
OR second_table.buyer_name LIKE ?',
'%' . $value . '%'
);
}

protected function callbackFilterStatus($collection, $column)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ protected function getAvailableActions(): array
Log::ACTION_DELETE_PRODUCT_FROM_COMPONENT => __('Remove from Channel'),
Log::ACTION_DELETE_AND_REMOVE_PRODUCT => __('Remove from Channel & Listing'),
Log::ACTION_DELETE_PRODUCT_FROM_LISTING => __('Remove from Listing'),
Log::ACTION_RESET_BLOCKED_PRODUCT => __('Reset Incomplete Item'),
Log::ACTION_SWITCH_TO_AFN_ON_COMPONENT => __('Switch to AFN'),
Log::ACTION_SWITCH_TO_MFN_ON_COMPONENT => __('Switch to MFN'),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,6 @@ protected function _prepareMassaction()
'url' => '',
]);

$this->getMassactionBlock()->addItem('resetProducts', [
'label' => __('Reset Incomplete Item(s)'),
'url' => '',
], 'other');

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

return parent::_prepareMassaction();
Expand Down
4 changes: 0 additions & 4 deletions Block/Adminhtml/Walmart/Listing/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ public function getGridHtml()
'runStopProducts' => $this->getUrl('*/walmart_listing/runStopProducts'),
'runStopAndRemoveProducts' => $this->getUrl('*/walmart_listing/runStopAndRemoveProducts'),
'runDeleteAndRemoveProducts' => $this->getUrl('*/walmart_listing/runDeleteAndRemoveProducts'),
'runResetProducts' => $this->getUrl('*/walmart_listing/runResetProducts'),
]
);

Expand Down Expand Up @@ -274,8 +273,6 @@ public function getGridHtml()
$deletingAndRemovingSelectedItemsMessage = __('Removing From Walmart And Listing Selected Items');
$removingSelectedItemsMessage = __('Removing From Listing Selected Items');

$resetBlockedProductsMessage = __('Reset Incomplete Items');

$selectItemsMessage = __('Please select the Products you want to perform the Action on.');
$selectActionMessage = __('Please select Action.');

Expand Down Expand Up @@ -333,7 +330,6 @@ public function getGridHtml()
'stopping_and_removing_selected_items_message' => $stoppingAndRemovingSelectedItemsMessage,
'deleting_and_removing_selected_items_message' => $deletingAndRemovingSelectedItemsMessage,
'removing_selected_items_message' => $removingSelectedItemsMessage,
'reset_blocked_products_message' => $resetBlockedProductsMessage,

'select_items_message' => $selectItemsMessage,
'select_action_message' => $selectActionMessage,
Expand Down
5 changes: 0 additions & 5 deletions Block/Adminhtml/Walmart/Listing/View/Walmart/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,6 @@ protected function _prepareMassaction()

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

$this->getMassactionBlock()->addItem('resetProducts', [
'label' => __('Reset Incomplete Item(s)'),
'url' => '',
], 'other');

return parent::_prepareMassaction();
}

Expand Down
134 changes: 0 additions & 134 deletions Controller/Adminhtml/Walmart/Listing/RunResetProducts.php

This file was deleted.

1 change: 1 addition & 0 deletions Helper/Module/Database/Tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Tables

public const TABLE_ORDER = self::PREFIX . 'order';

public const TABLE_EBAY_ACCOUNT = self::PREFIX . 'ebay_account';
public const TABLE_EBAY_ITEM = self::PREFIX . 'ebay_item';
public const TABLE_EBAY_LISTING = self::PREFIX . 'ebay_listing';
public const TABLE_EBAY_LISTING_PRODUCT = self::PREFIX . 'ebay_listing_product';
Expand Down
9 changes: 9 additions & 0 deletions Model/Amazon/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,15 @@ private function getBillingAddressMode(): int
);
}

public function isImportBuyerCompanyName(): bool
{
return (bool)$this->getSetting(
'magento_orders_settings',
['customer', 'import_buyer_company_name'],
1
);
}

/**
* @return bool
*/
Expand Down
2 changes: 2 additions & 0 deletions Model/Amazon/Account/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ protected function prepareData(): array
'website_id',
'group_id',
'billing_address_mode',
'import_buyer_company_name',
];
foreach ($keys as $key) {
if (isset($tempSettings[$key])) {
Expand Down Expand Up @@ -478,6 +479,7 @@ public function getDefaultData(): array
],
'billing_address_mode' =>
Account::USE_SHIPPING_ADDRESS_AS_BILLING_IF_SAME_CUSTOMER_AND_RECIPIENT,
'import_buyer_company_name' => 1,
],
'status_mapping' => [
'mode' => Account::MAGENTO_ORDERS_STATUS_MAPPING_MODE_DEFAULT,
Expand Down
2 changes: 1 addition & 1 deletion Model/Amazon/Dictionary/MarketplaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private function processRemovedProductTypes(

private function restoreInvalidProductTypes(
\Ess\M2ePro\Model\Marketplace $marketplace,
mixed $listProductTypesNicks
array $listProductTypesNicks
): void {
$existProductTypesMap = array_flip($listProductTypesNicks);
foreach ($this->dictionaryProductTypeRepository->findByMarketplace($marketplace) as $productType) {
Expand Down
Loading

0 comments on commit 0d3713a

Please sign in to comment.