Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
f744606
Fixed child items showing on My Account order view
rogyar Sep 2, 2018
2f42118
ENGCOM-2911: Fixed child items showing on My Account order view #17889
magento-engcom-team Sep 21, 2018
10fb01f
MAGETWO-86121: [Backport] Cannot ship remaining items in an order for…
OlgaVasyltsun Oct 5, 2018
8032681
MAGETWO-86121: [Backport] Cannot ship remaining items in an order for…
OlgaVasyltsun Oct 5, 2018
cf8f34c
MAGETWO-86121: [Backport] Cannot ship remaining items in an order for…
OlgaVasyltsun Oct 5, 2018
654df0a
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-86121
OlgaVasyltsun Oct 8, 2018
46ae326
MAGETWO-86121: [Backport] Cannot ship remaining items in an order for…
OlgaVasyltsun Oct 8, 2018
1d8c426
MAGETWO-86121: [Backport] Cannot ship remaining items in an order for…
OlgaVasyltsun Oct 8, 2018
00f8cfe
Merge branch '2.2-develop' into ENGCOM-2911-magento-magento2-17889
nmalevanec Oct 16, 2018
767245a
MAGETWO-94235: Images added through wysiwyg are broken on frontend
iivashchenko Oct 20, 2018
94d4d98
MAGETWO-72877: Zero Subtotal Orders have incorrect status
viktorpetryk Oct 30, 2018
529233c
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72877
viktorpetryk Oct 31, 2018
3fc1a58
MAGETWO-72877: Zero Subtotal Orders have incorrect status
viktorpetryk Oct 31, 2018
194efb2
MAGETWO-89377: Cannot set Phone Number not required
svitja Oct 31, 2018
b0604ec
MAGETWO-96027: Invalid element declared for AdminProductGridSection s…
droed89 Oct 31, 2018
e5a90d8
MAGETWO-89377: Cannot set Phone Number not required
svitja Oct 31, 2018
7dfbb88
Merge branch '2.2-develop' of https://github.com/magento/magento2ce i…
droed89 Nov 1, 2018
6940d20
MAGETWO-73528: Out of stock associated products to configurable are n…
OlgaVasyltsun Nov 1, 2018
c8618a1
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-89377
svitja Nov 1, 2018
e6149ff
MAGETWO-72877: Zero Subtotal Orders have incorrect status
viktorpetryk Nov 1, 2018
5e348ad
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72877
viktorpetryk Nov 1, 2018
9b984a5
Merge branch '2.2-develop' of https://github.com/magento/magento2ce i…
droed89 Nov 1, 2018
a643e25
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72877
viktorpetryk Nov 1, 2018
0ac1a49
MAGETWO-72877: Zero Subtotal Orders have incorrect status
viktorpetryk Nov 1, 2018
7e7faa3
MAGETWO-73528: Out of stock associated products to configurable are n…
OlgaVasyltsun Nov 2, 2018
7443dc3
MAGETWO-96079: Cannot update password using received link
viktorpetryk Nov 5, 2018
a7f1c7d
MAGETWO-95781: The value Quantity of Advenced Pricing isn't saved cor…
zakdma Nov 5, 2018
f7028c2
MAGETWO-95781: The value Quantity of Advenced Pricing isn't saved cor…
zakdma Nov 5, 2018
53571e6
MAGETWO-96076: In field "Street Address" not present require icon
zakdma Nov 5, 2018
3d8b8d2
MAGETWO-95781: The value Quantity of Advenced Pricing isn't saved cor…
zakdma Nov 5, 2018
9fe5066
MAGETWO-86292: Unable to create Credit memo for order with no payment…
SeruyV Nov 6, 2018
a61bc0b
MAGETWO-73061: [GitHub] REST API Missing Product_Option values for Or…
Nov 6, 2018
22a374d
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-73061
Nov 6, 2018
c28d5df
MAGETWO-85162: Results of filters with color and other filters are no…
svitja Nov 6, 2018
b1f6590
MAGETWO-73061: [GitHub] REST API Missing Product_Option values for Or…
Nov 7, 2018
44d1d57
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-73061
Nov 7, 2018
f8a3220
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-85162
svitja Nov 7, 2018
d1d035c
MAGETWO-85162: Results of filters with color and other filters are no…
svitja Nov 7, 2018
77304d4
fix cipherMethod detection for openssl 1.1.1
BlackIkeEagle Nov 7, 2018
781abf9
ENGCOM-3412: [2.2 backport] fix cipherMethod detection for openssl 1.…
magento-engcom-team Nov 8, 2018
7aa7ce0
MAGETWO-73061: [GitHub] REST API Missing Product_Option values for Or…
Nov 8, 2018
8797fc8
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-73061
Nov 8, 2018
0c36fc7
MAGETWO-96074: Incorrect product displaying on storefront in IE11
zakdma Nov 8, 2018
00932fc
MAGETWO-96236: [SO-3036] Bug with stock status in price indexer
slopukhov Nov 9, 2018
910a976
MAGETWO-96236: [SO-3036] Bug with stock status in price indexer
slopukhov Nov 9, 2018
1af3db5
MAGETWO-96236: [SO-3036] Bug with stock status in price indexer
slopukhov Nov 9, 2018
3ec427f
MAGETWO-73061: [GitHub] REST API Missing Product_Option values for Or…
Nov 9, 2018
3750ccd
MAGETWO-96236: [SO-3036] Bug with stock status in price indexer
slopukhov Nov 9, 2018
e08dd1d
MAGETWO-95759: Category tree display wrong number of product
svitja Nov 9, 2018
9b47faa
MAGETWO-95759: Category tree display wrong number of product
svitja Nov 9, 2018
4b022dc
MAGETWO-95759: Category tree display wrong number of product
svitja Nov 12, 2018
b090e88
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-95781
zakdma Nov 12, 2018
eea0350
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-86292
viktorpetryk Nov 12, 2018
955caf7
MAGETWO-95781: The value Quantity of Advenced Pricing isn't saved cor…
zakdma Nov 12, 2018
e731723
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-72877
SeruyV Nov 12, 2018
733a35a
Merge remote-tracking branch 'origin/MAGETWO-72877' into 2.2-develop-…
SeruyV Nov 12, 2018
6f6694c
MAGETWO-96288: [Magento Cloud] Cannot update category positions via R…
dhorytskyi Nov 12, 2018
9169167
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-86121
svitja Nov 13, 2018
a0df5c5
Merge remote-tracking branch 'origin/MAGETWO-86121' into 2.2-develop-…
svitja Nov 13, 2018
48738ea
MAGETWO-96174: [2.2] Improve order creation flow
yelahin-serhiy Nov 13, 2018
9c066ca
MAGETWO-87920: Shipping method Table Rates settings gets from wrong s…
zakdma Nov 13, 2018
3fe6c70
MAGETWO-96288: [Magento Cloud] Cannot update category positions via R…
dhorytskyi Nov 13, 2018
36d6331
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-95781
SeruyV Nov 13, 2018
5507cf7
Merge remote-tracking branch 'origin/MAGETWO-95781' into 2.2-develop-…
SeruyV Nov 13, 2018
abb1c4c
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-96079
SeruyV Nov 13, 2018
a5c8e5a
Merge remote-tracking branch 'origin/MAGETWO-96079' into 2.2-develop-…
SeruyV Nov 13, 2018
48865d8
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-89377
SeruyV Nov 13, 2018
a8f7cf9
Merge remote-tracking branch 'origin/MAGETWO-89377' into 2.2-develop-…
SeruyV Nov 13, 2018
4b3b669
MAGETWO-96156: Track not saved during shipment creation through API
rostyslav-hymon Nov 13, 2018
6b57fc4
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-85162
SeruyV Nov 13, 2018
7c2615c
Merge remote-tracking branch 'origin/MAGETWO-85162' into 2.2-develop-…
SeruyV Nov 13, 2018
ed8fde4
MAGETWO-88810: Bundled SKUs are being assembled based on the product …
zakdma Nov 13, 2018
b665c45
Merge remote-tracking branch 'origin/MAGETWO-95759' into 2.2-develop-…
StasKozar Nov 13, 2018
0e47557
Merge remote-tracking branch 'origin/MAGETWO-87920' into 2.2-develop-…
StasKozar Nov 13, 2018
c0bfa9b
MAGETWO-96288: [Magento Cloud] Cannot update category positions via R…
dhorytskyi Nov 13, 2018
aa206ef
Merge branch '2.2-develop' of https://github.com/magento/magento2ce i…
dhorytskyi Nov 13, 2018
008a763
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-88810
zakdma Nov 13, 2018
021cde1
Merge branch '2.2-develop' of github.com:magento/magento2ce into MAGE…
slopukhov Nov 14, 2018
af6f54f
MAGETWO-96288: [Magento Cloud] Cannot update category positions via R…
dhorytskyi Nov 14, 2018
93e08a7
MAGETWO-73140: Anchor categories are showing products of disabled sub…
SeruyV Nov 14, 2018
e9e9253
Merge remote-tracking branch 'origin/MAGETWO-73528' into 2.2-develop-…
StasKozar Nov 14, 2018
2493d0b
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-pr57
zakdma Nov 14, 2018
e673c83
Merge pull request #3435 from magento-performance/MAGETWO-96236
duhon Nov 14, 2018
48e1b11
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-pr57
zakdma Nov 14, 2018
45c2542
MAGETWO-86120: [2.2] Gift message selection does not display in shopp…
zakdma Nov 14, 2018
e6fee77
Merge pull request #3448 from magento-tsg/2.2-develop-pr57
Nov 14, 2018
dae72c6
MAGETWO-87985: Unit test changes
OlgaVasyltsun Nov 15, 2018
dfdcef6
Merge branch 'MAGETWO-96156' into 2.2-develop-pr10
rostyslav-hymon Nov 15, 2018
88d6f85
Merge branch 'MAGETWO-96174' into 2.2-develop-pr10
yelahin-serhiy Nov 15, 2018
9f967e9
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-87985
OlgaVasyltsun Nov 15, 2018
ea434c7
Merge branch 'MAGETWO-73061' into 2.2-develop-pr10
Nov 15, 2018
0cae940
Merge remote-tracking branch 'origin/MAGETWO-88810' into 2.2-develop-…
StasKozar Nov 15, 2018
2c6d6af
Merge branch 'MAGETWO-94235' into mpi-fix-94235
Nov 15, 2018
011f0fd
Merge branch 'MAGETWO-96288' of https://github.com/magento-tango/mage…
droed89 Nov 15, 2018
f56c993
Merge branch 'MAGETWO-96027' of https://github.com/magento-tango/mage…
droed89 Nov 15, 2018
bc904a2
Merge remote-tracking branch 'origin/2.2-develop' into MAGETWO-73140
viktorpetryk Nov 16, 2018
c9d1923
Merge remote-tracking branch 'origin/MAGETWO-73140' into 2.2-develop-…
viktorpetryk Nov 16, 2018
cb868c4
Merge remote-tracking branch 'origin/MAGETWO-87985' into 2.2-develop-…
StasKozar Nov 16, 2018
5eb8a99
Merge remote-tracking branch 'origin/MAGETWO-96074' into 2.2-develop-…
zakdma Nov 16, 2018
e544c95
Merge remote-tracking branch 'origin/MAGETWO-86120' into 2.2-develop-…
zakdma Nov 16, 2018
da0b4f1
Merge pull request #3452 from magento-mpi/mpi-fix-94235
viktym Nov 16, 2018
3b6c90b
Merge branch '2.2-develop' of https://github.com/magento/magento2ce i…
dhorytskyi Nov 16, 2018
4b8bafd
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-pr58
zakdma Nov 16, 2018
06bb53d
merge magento/2.2-develop into magento-tsg-csl3/2.2-develop-pr10
magento-cicd2 Nov 16, 2018
7775f7d
Merge pull request #3455 from magento-tango/PR_15_11_2018
dhorytskyi Nov 16, 2018
0b16224
ENGCOM-3412: [2.2 backport] fix cipherMethod detection for openssl 1.…
slavvka Nov 16, 2018
064d879
ENGCOM-2911: Fixed child items showing on My Account order view #17889
slavvka Nov 16, 2018
d14510f
:arrows_clockwise: [EngCom] Public Pull Requests - 2.2-develop
slavvka Nov 16, 2018
4c761a5
Merge branch '2.2-develop' into 2.2-develop-pr10
serhii-balko Nov 19, 2018
d3dcc9d
Merge pull request #3458 from magento-tsg-csl3/2.2-develop-pr10
viktym Nov 19, 2018
4ef6d0b
Merge remote-tracking branch 'origin/2.2-develop' into 2.2-develop-pr58
zakdma Nov 20, 2018
b1e26d5
Merge pull request #3469 from magento-tsg/2.2-develop-pr58
xmav Nov 20, 2018
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
7 changes: 6 additions & 1 deletion app/code/Magento/Analytics/Model/Cryptographer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ private function getInitializationVector()
*/
private function validateCipherMethod($cipherMethod)
{
$methods = openssl_get_cipher_methods();
$methods = array_map(
'strtolower',
openssl_get_cipher_methods()
);
$cipherMethod = strtolower($cipherMethod);

return (false !== array_search($cipherMethod, $methods));
}
}
7 changes: 5 additions & 2 deletions app/code/Magento/Bundle/Model/Product/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,11 @@ public function getSku($product)
$selectionIds = $this->serializer->unserialize($customOption->getValue());
if (!empty($selectionIds)) {
$selections = $this->getSelectionsByIds($selectionIds, $product);
foreach ($selections->getItems() as $selection) {
$skuParts[] = $selection->getSku();
foreach ($selectionIds as $selectionId) {
$entity = $selections->getItemByColumnValue('selection_id', $selectionId);
if (isset($entity) && $entity->getEntityId()) {
$skuParts[] = $entity->getSku();
}
}
}
}
Expand Down
11 changes: 7 additions & 4 deletions app/code/Magento/Bundle/Test/Unit/Model/Product/TypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ public function testGetSkuWithoutType()
->disableOriginalConstructor()
->getMock();
$selectionItemMock = $this->getMockBuilder(\Magento\Framework\DataObject::class)
->setMethods(['getSku', '__wakeup'])
->setMethods(['getSku', 'getEntityId', '__wakeup'])
->disableOriginalConstructor()
->getMock();

Expand Down Expand Up @@ -1623,9 +1623,12 @@ public function testGetSkuWithoutType()
->will($this->returnValue($serializeIds));
$selectionMock = $this->getSelectionsByIdsMock($selectionIds, $productMock, 5, 6);
$selectionMock->expects(($this->any()))
->method('getItems')
->will($this->returnValue([$selectionItemMock]));
$selectionItemMock->expects($this->any())
->method('getItemByColumnValue')
->will($this->returnValue($selectionItemMock));
$selectionItemMock->expects($this->at(0))
->method('getEntityId')
->will($this->returnValue(1));
$selectionItemMock->expects($this->once())
->method('getSku')
->will($this->returnValue($itemSku));

Expand Down
7 changes: 7 additions & 0 deletions app/code/Magento/Bundle/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@
</argument>
</arguments>
</type>
<type name="Magento\Sales\Model\Order\ProductOption">
<arguments>
<argument name="processorPool" xsi:type="array">
<item name="bundle" xsi:type="object">Magento\Bundle\Model\ProductOptionProcessor</item>
</argument>
</arguments>
</type>
<type name="Magento\Bundle\Ui\DataProvider\Product\Listing\Collector\BundlePrice">
<arguments>
<argument name="excludeAdjustments" xsi:type="array">
Expand Down
22 changes: 7 additions & 15 deletions app/code/Magento/Catalog/Model/Category/Link/SaveHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,19 @@ private function getCategoryLinksPositions($entity)
*/
private function mergeCategoryLinks($newCategoryPositions, $oldCategoryPositions)
{
$result = [];
if (empty($newCategoryPositions)) {
return $result;
return [];
}

$categoryPositions = array_combine(array_column($oldCategoryPositions, 'category_id'), $oldCategoryPositions);
foreach ($newCategoryPositions as $newCategoryPosition) {
$key = array_search(
$newCategoryPosition['category_id'],
array_column($oldCategoryPositions, 'category_id')
);

if ($key === false) {
$result[] = $newCategoryPosition;
} elseif (isset($oldCategoryPositions[$key])
&& $oldCategoryPositions[$key]['position'] != $newCategoryPosition['position']
) {
$result[] = $newCategoryPositions[$key];
unset($oldCategoryPositions[$key]);
$categoryId = $newCategoryPosition['category_id'];
if (!isset($categoryPositions[$categoryId])) {
$categoryPositions[$categoryId] = ['category_id' => $categoryId];
}
$categoryPositions[$categoryId]['position'] = $newCategoryPosition['position'];
}
$result = array_merge($result, $oldCategoryPositions);
$result = array_values($categoryPositions);

return $result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ abstract class AbstractAction
*/
private $queryGenerator;

/**
* Current store id.
* @var int
*/
private $currentStoreId = 0;

/**
* @param ResourceConnection $resource
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
Expand Down Expand Up @@ -167,6 +173,7 @@ protected function reindex()
{
foreach ($this->storeManager->getStores() as $store) {
if ($this->getPathFromCategoryId($store->getRootCategoryId())) {
$this->currentStoreId = $store->getId();
$this->reindexRootCategory($store);
$this->reindexAnchorCategories($store);
$this->reindexNonAnchorCategories($store);
Expand Down Expand Up @@ -594,7 +601,7 @@ protected function getTemporaryTreeIndexTableName()
if (empty($this->tempTreeIndexTableName)) {
$this->tempTreeIndexTableName = $this->connection->getTableName('temp_catalog_category_tree_index')
. '_'
. substr(md5(time() . random_int(0, 999999999)), 0, 8);
. substr(sha1(time() . random_int(0, 999999999)), 0, 8);
}

return $this->tempTreeIndexTableName;
Expand Down Expand Up @@ -649,30 +656,47 @@ protected function makeTempCategoryTreeIndex()
}

/**
* Populate the temporary category tree index table
* Populate the temporary category tree index table.
*
* @param string $temporaryName
* @return void
* @since 101.0.0
*/
protected function fillTempCategoryTreeIndex($temporaryName)
{
$offset = 0;
$limit = 500;

$categoryTable = $this->getTable('catalog_category_entity');

$categoriesSelect = $this->connection->select()
->from(
['c' => $categoryTable],
['entity_id', 'path']
)->limit($limit, $offset);

$categories = $this->connection->fetchAll($categoriesSelect);
$isActiveAttributeId = $this->config->getAttribute(
\Magento\Catalog\Model\Category::ENTITY,
'is_active'
)->getId();
$categoryMetadata = $this->metadataPool->getMetadata(\Magento\Catalog\Api\Data\CategoryInterface::class);
$categoryLinkField = $categoryMetadata->getLinkField();
$selects = $this->prepareSelectsByRange(
$this->connection->select()
->from(
['c' => $this->getTable('catalog_category_entity')],
['entity_id', 'path']
)->joinInner(
['ccacd' => $this->getTable('catalog_category_entity_int')],
'ccacd.' . $categoryLinkField . ' = c.' . $categoryLinkField
. ' AND ccacd.store_id = 0' . ' AND ccacd.attribute_id = ' . $isActiveAttributeId,
[]
)->joinLeft(
['ccacs' => $this->getTable('catalog_category_entity_int')],
'ccacs.' . $categoryLinkField . ' = c.' . $categoryLinkField
. ' AND ccacs.attribute_id = ccacd.attribute_id AND ccacs.store_id = '
. $this->currentStoreId,
[]
)->where(
$this->connection->getIfNullSql('ccacs.value', 'ccacd.value') . ' = ?',
1
),
'entity_id'
);

while ($categories) {
foreach ($selects as $select) {
$values = [];

foreach ($categories as $category) {
foreach ($this->connection->fetchAll($select) as $category) {
foreach (explode('/', $category['path']) as $parentId) {
if ($parentId !== $category['entity_id']) {
$values[] = [$parentId, $category['entity_id']];
Expand All @@ -683,15 +707,6 @@ protected function fillTempCategoryTreeIndex($temporaryName)
if (count($values) > 0) {
$this->connection->insertArray($temporaryName, ['parent_id', 'child_id'], $values);
}

$offset += $limit;
$categoriesSelect = $this->connection->select()
->from(
['c' => $categoryTable],
['entity_id', 'path']
)->limit($limit, $offset);

$categories = $this->connection->fetchAll($categoriesSelect);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Catalog\Model\Product\Attribute\Backend\TierPrice;

use Magento\Framework\EntityManager\Operation\ExtensionInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Catalog\Api\ProductAttributeRepositoryInterface;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Customer\Api\GroupManagementInterface;
use Magento\Framework\EntityManager\MetadataPool;
use Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Tierprice;

/**
* Tier price data abstract handler.
*/
abstract class AbstractHandler implements ExtensionInterface
{
/**
* @var \Magento\Customer\Api\GroupManagementInterface
*/
protected $groupManagement;

/**
* @param \Magento\Customer\Api\GroupManagementInterface $groupManagement
*/
public function __construct(
GroupManagementInterface $groupManagement
) {
$this->groupManagement = $groupManagement;
}

/**
* Get additional tier price fields.
*
* @return array
*/
protected function getAdditionalFields(array $objectArray): array
{
$percentageValue = $this->getPercentage($objectArray);

return [
'value' => $percentageValue ? null : $objectArray['price'],
'percentage_value' => $percentageValue ?: null,
];
}

/**
* Check whether price has percentage value.
*
* @param array $priceRow
* @return integer|null
*/
protected function getPercentage(array $priceRow)
{
return isset($priceRow['percentage_value']) && is_numeric($priceRow['percentage_value'])
? (int)$priceRow['percentage_value']
: null;
}

/**
* Prepare tier price data by provided price row data.
*
* @param array $data
* @return array
*/
protected function prepareTierPrice(array $data): array
{
$useForAllGroups = (int)$data['cust_group'] === $this->groupManagement->getAllCustomersGroup()->getId();
$customerGroupId = $useForAllGroups ? 0 : $data['cust_group'];
$tierPrice = array_merge(
$this->getAdditionalFields($data),
[
'website_id' => $data['website_id'],
'all_groups' => (int)$useForAllGroups,
'customer_group_id' => $customerGroupId,
'value' => $data['price'] ?? null,
'qty' => $this->parseQty($data['price_qty']),
]
);

return $tierPrice;
}

/**
* Parse quantity value into float.
*
* @param mixed $value
* @return float|int
*/
protected function parseQty($value)
{
return $value * 1;
}
}
Loading