Skip to content

Commit

Permalink
multiplied amount and price by 100 to accommodate for the accessor in…
Browse files Browse the repository at this point in the history
… the product model in formattedPrice Attribute
  • Loading branch information
abdelhamiderrahmouni committed Nov 5, 2023
1 parent e17891d commit b2cb236
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Models/Shop/Product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,12 @@ public function getFormattedPriceAttribute(): ?string
{
if ($this->parent_id) {
return $this->price_amount
? $this->formattedPrice($this->price_amount)
: ($this->parent->price_amount ? $this->formattedPrice($this->parent->price_amount) : null);
? $this->formattedPrice($this->price_amount * 100)
: ($this->parent->price_amount ? $this->formattedPrice($this->parent->price_amount * 100) : null);
}

return $this->price_amount
? $this->formattedPrice($this->price_amount)
? $this->formattedPrice($this->price_amount * 100)
: null;
}

Expand Down

0 comments on commit b2cb236

Please sign in to comment.