Skip to content

Commit

Permalink
Update Product.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Swader authored Aug 17, 2017
1 parent 1267c36 commit 933f4e7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Entity/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ public function __construct(array $data)
if (isset($this->data['discussion'])) {
$this->discussion = new Discussion($this->data['discussion']);
}

if (!isset($this->data['offerPrice'])) {
$this->data['availability'] = false;
$this->data['offerPrice'] = null;
$this->data['offerPriceDetails'] = [];
}
}

/**
Expand Down Expand Up @@ -223,7 +229,7 @@ public function isAvailable()

/**
* Offer or actual/final price of the product.
* @return string
* @return string | null
*/
public function getOfferPrice()
{
Expand Down

0 comments on commit 933f4e7

Please sign in to comment.