We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1267c36 commit 933f4e7Copy full SHA for 933f4e7
src/Entity/Product.php
@@ -18,6 +18,12 @@ public function __construct(array $data)
18
if (isset($this->data['discussion'])) {
19
$this->discussion = new Discussion($this->data['discussion']);
20
}
21
+
22
+ if (!isset($this->data['offerPrice'])) {
23
+ $this->data['availability'] = false;
24
+ $this->data['offerPrice'] = null;
25
+ $this->data['offerPriceDetails'] = [];
26
+ }
27
28
29
/**
@@ -223,7 +229,7 @@ public function isAvailable()
223
229
224
230
225
231
* Offer or actual/final price of the product.
226
- * @return string
232
+ * @return string | null
227
233
*/
228
234
public function getOfferPrice()
235
{
0 commit comments