discount cart rules

This commit is contained in:
merdan 2022-11-17 16:14:38 +05:00
parent 30eea44d48
commit 2135fdbdcd
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class CartRuleResource extends JsonResource
'description' => $this->description, 'description' => $this->description,
'is_fixed' => $is_fixed, 'is_fixed' => $is_fixed,
'is_discount' => $this->discount_amoun >0, 'is_discount' => $this->discount_amoun >0,
'amount' => (double) ($is_fixed ? 'amount' => abs($is_fixed ?
core()->convertPrice($this->discount_amount, $this->currency): core()->convertPrice($this->discount_amount, $this->currency):
$this->discount_amount) $this->discount_amount)
]; ];