testemich Promotion

This commit is contained in:
Kevin Adametz 2022-04-14 13:21:17 +02:00
parent 38e7fd504a
commit a0f4eda6ea
83 changed files with 1690 additions and 504 deletions

View file

@ -102,7 +102,7 @@ class PromotionAdminProduct extends Model
public function setPriceAttribute( $value ) {
$this->attributes['price'] = $value ? Util::reFormatNumber($value) : null;
$this->attributes['price'] = $value !== null ? Util::reFormatNumber($value) : null;
}
public function getFormattedPrice()
@ -112,7 +112,7 @@ class PromotionAdminProduct extends Model
public function getRealPrice()
{
if($this->own_price && $this->price){
if($this->own_price && $this->price !== null){
return $this->price;
}
if($this->product && $this->product->price){