File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
dev/tests/functional/tests/app/Magento
ImportExport/Test/Fixture/Import Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -18,13 +18,13 @@ class AssertAdvancedPriceAbsentOnProductForm extends AbstractConstraint
18
18
/**
19
19
* Assert advanced price is absent on product page in form.
20
20
*
21
- * @param FixtureInterface[] $products
21
+ * @param FixtureInterface[] $entities
22
22
* @param CatalogProductEdit $productPage
23
23
* @return void
24
24
*/
25
- public function processAssert (array $ products , CatalogProductEdit $ productPage )
25
+ public function processAssert (array $ entities , CatalogProductEdit $ productPage )
26
26
{
27
- foreach ($ products as $ product ) {
27
+ foreach ($ entities as $ product ) {
28
28
$ productPage ->open (['id ' => $ product ->getData ('id ' )]);
29
29
/** @var AdvancedPricing $advancedPricing */
30
30
$ advancedPricing = $ productPage ->getProductForm ()
Original file line number Diff line number Diff line change @@ -213,7 +213,12 @@ private function preparePlaceHolders()
213
213
if (isset ($ entityData [$ index ])) {
214
214
$ placeholders ['entity_ ' . $ key ][$ tierKey ]["% {$ index }% " ] = $ entityData [$ index ];
215
215
}
216
- $ placeholders ['entity_ ' . $ key ][$ tierKey ][$ entityData ['code ' ]] = $ entityData [$ entityData ['code ' ]];
216
+ if (isset ($ entityData ['code ' ])) {
217
+ $ placeholders ['entity_ ' . $ key ][$ tierKey ][$ entityData ['code ' ]]
218
+ = isset ($ entityData [$ entityData ['code ' ]])
219
+ ? $ entityData [$ entityData ['code ' ]]
220
+ : 'Main Website ' ;
221
+ }
217
222
}
218
223
}
219
224
$ key ++;
@@ -237,7 +242,9 @@ public function prepareEntityData(FixtureInterface $entity)
237
242
$ websites = $ entity ->getDataFieldConfig ('website_ids ' )['source ' ]->getWebsites ();
238
243
foreach ($ websites as $ website ) {
239
244
if ($ website ->getCode () === 'base ' ) {
240
- $ currency = $ this ->value ['template ' ]['mainWebsiteCurrency ' ];
245
+ $ currency = isset ($ this ->value ['template ' ]['mainWebsiteCurrency ' ])
246
+ ? $ this ->value ['template ' ]['websiteCurrency ' ]
247
+ : '[USD] ' ;
241
248
$ this ->mainWebsiteMapping ['base ' ] = $ website ->getName () . "[ {$ currency }] " ;
242
249
break ;
243
250
}
You can’t perform that action at this time.
0 commit comments