Skip to content

Commit

Permalink
6.43.4 (FINAL RELEASE)
Browse files Browse the repository at this point in the history
  • Loading branch information
m2epro committed Aug 2, 2023
1 parent 17a1465 commit ee07916
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,14 @@ protected function getClearVariationValue(Ess_M2ePro_Model_Listing_Product_Varia
continue;
}

$optionsQtyArray[$option->getProductId()][] = $this->getOptionBaseValue($option);
$qty = $this->getOptionBaseValue($option);
$bundleDefaultQty = $this
->getMagentoProduct()
->getBundleDefaultQty($option->getProductId());

$qty /= $bundleDefaultQty;

$optionsQtyArray[$option->getProductId()][] = $qty;
}

foreach ($optionsQtyArray as $optionQty) {
Expand Down
17 changes: 17 additions & 0 deletions app/code/community/Ess/M2ePro/Model/Magento/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,23 @@ public function getQty($lifeMode = false)
);
}

public function getBundleDefaultQty($productId)
{
$product = $this->getProduct();
$productInstance = $this->getTypeInstance();
$optionCollection = $productInstance->getOptionsCollection($product);
$selectionsCollection = $productInstance->getSelectionsCollection($optionCollection->getAllIds(), $product);
$items = $selectionsCollection->getItems();

foreach ($items as $item) {
if ((int)$item->getId() === (int)$productId) {
return $item->getSelectionQty();
}
}

return 1;
}

public function setQty($value)
{
$this->getStockItem()->setQty($value)->save();
Expand Down
7 changes: 7 additions & 0 deletions app/code/community/Ess/M2ePro/Model/Order/Reserve.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ protected function performAction($action, $newState)

$productsExistCount++;

if ($item->getMagentoProduct()->isBundleType()) {
$bundleDefaultQty = $item
->getMagentoProduct()
->getBundleDefaultQty($magentoProduct->getProductId());
$qty *= $bundleDefaultQty;
}

if (!isset($stockItems[$productId])) {
$stockItems[$productId] = $magentoProduct->getStockItem();
}
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.43.3",
"version": "6.43.4",
"license": "proprietary",
"keywords": ["ebay", "amazon", "walmart", "magento"],
"homepage": "https://www.m2epro.com/",
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.43.3</version>
<version>6.43.4</version>
</Ess_M2ePro>
</modules>
<default>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
* @license Commercial use is forbidden
*/

class Ess_M2ePro_Sql_Upgrade_v6_43_0__v6_43_3_Config extends Ess_M2ePro_Model_Upgrade_Feature_AbstractConfig
class Ess_M2ePro_Sql_Upgrade_v6_42_0__v6_43_0_Config extends Ess_M2ePro_Model_Upgrade_Feature_AbstractConfig
{
public function getFeaturesList()
{
return array();
return array(
'@y23_m06/IgnoreVariationMpnInResolverConfig',
);
}
}
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_43_0__v6_43_3_Config extends Ess_M2ePro_Model_Upgrade_Feature_AbstractConfig
{
public function getFeaturesList()
{
return array();
}
}
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_43_3__v6_43_4_Config extends Ess_M2ePro_Model_Upgrade_Feature_AbstractConfig
{
public function getFeaturesList()
{
return array();
}
}
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.43.3",
"version": "6.43.4",
"license": "proprietary",
"keywords": ["ebay", "amazon", "walmart", "magento"],
"homepage": "https://www.m2epro.com/",
Expand Down

0 comments on commit ee07916

Please sign in to comment.