testemich Promotion
This commit is contained in:
parent
38e7fd504a
commit
a0f4eda6ea
83 changed files with 1690 additions and 504 deletions
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue