Skip to content

Commit 45c3f81

Browse files
committed
MAGETWO-65703: Fatal error on creation simple product with tier price in custom website via webapi handler
1 parent 9badb94 commit 45c3f81

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

dev/tests/functional/tests/app/Magento/AdvancedPricingImportExport/Test/TestCase/ExportAdvancedPricingTest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
<constraint name="Magento\AdvancedPricingImportExport\Test\Constraint\AssertExportAdvancedPricing"/>
5050
</variation>
5151
<variation name="ExportAdvancedPricingTestVariation4" summary="Trying export product data for product available on main website with default currency and custom website with different currency" ticketId="MAGETWO-48298">
52-
<data name="issue" xsi:type="string">MAGETWO-65703: Fatal error on creation simple product with tier price in custom website via webapi handler</data>
5352
<data name="configData" xsi:type="string">price_scope_website</data>
5453
<data name="exportData" xsi:type="string">csv_with_advanced_pricing</data>
5554
<data name="products/0" xsi:type="array">

dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Webapi.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ protected function prepareTierPrice()
288288
$priceInfo['qty'] = $priceInfo['price_qty'];
289289
unset($priceInfo['price_qty']);
290290

291-
unset($priceInfo['website_id']);
291+
if (isset($priceInfo['website_id'])) {
292+
$priceInfo['extension_attributes']['website_id'] = $priceInfo['website_id'];
293+
unset($priceInfo['website_id']);
294+
}
295+
292296
unset($priceInfo['delete']);
293297

294298
$this->fields['product']['tier_prices'][$key] = $priceInfo;

0 commit comments

Comments
 (0)