order details on checkout

This commit is contained in:
merdan 2020-03-24 18:51:15 +05:00
parent 22b939e62e
commit 11e873e83a
2 changed files with 5 additions and 1 deletions

View File

@ -21,4 +21,8 @@ class OrderItem extends MyBaseModel
*/
public $timestamps = false;
protected $fillable = ['title','order_id','quantity','unit_price','unit_booking_fee'];
public function getUnitTotalAttribute(){
return ($this->unit_price + $this->unit_booking_fee) * $this->quantity;
}
}

View File

@ -66,7 +66,7 @@ Order Email: <b>{{$order->email}}</b><br>
@if((int)ceil($order_item->unit_price) == 0)
FREE
@else
{{money(($order_item->unit_price + $order_item->unit_booking_fee) * ($order_item->quantity), $order->event->currency)}}
{{money($order_item->unit_total, $order->event->currency)}}
@endif
</td>