37 ?
float $purchasePrice,
38 ?
string $purchasePriceCurrency,
39 ?
float $basePrice =
null,
40 ?
string $basePriceCurrency =
null
43 $this->productId = $productId;
44 $this->purchasePrice = $purchasePrice;
45 $this->purchasePriceCurrency = $purchasePriceCurrency;
46 $this->basePrice = $basePrice;
47 $this->basePriceCurrency = $basePriceCurrency;
125 if (isset($this->purchasePrice))
128 'PURCHASING_PRICE' => $this->purchasePrice ?:
null,
129 'PURCHASING_CURRENCY' => $this->purchasePriceCurrency ?? $this->getDefaultCurrency(),
131 if (!$saveResult->isSuccess())
134 $saveResult->getErrors()
139 if (isset($this->basePrice))
141 $basePriceRowId = $this->getBasePriceRowId();
145 'PRICE' => $this->basePrice,
146 'CURRENCY' => $this->basePriceCurrency,
152 'PRODUCT_ID' => $this->productId,
153 'CATALOG_GROUP_ID' => $this->getBasePriceGroupId(),
154 'PRICE' => $this->basePrice,
155 'CURRENCY' => $this->basePriceCurrency ?? $this->getDefaultCurrency(),
159 if (!$saveResult->isSuccess())
162 $saveResult->getErrors()