payment Card first 4 payments inc. mails
This commit is contained in:
parent
c20deac3fe
commit
6e3adac4d7
38 changed files with 3063 additions and 921 deletions
|
|
@ -6,5 +6,34 @@ use Illuminate\Database\Eloquent\Model;
|
|||
|
||||
class ShoppingOrderItem extends Model
|
||||
{
|
||||
//
|
||||
}
|
||||
protected $table = 'shopping_order_items';
|
||||
|
||||
protected $fillable = [
|
||||
'shopping_order_id',
|
||||
'row_id',
|
||||
'product_id',
|
||||
'qty',
|
||||
'price',
|
||||
'slug',
|
||||
];
|
||||
|
||||
|
||||
public function shopping_order()
|
||||
{
|
||||
return $this->belongsTo('App\Models\ShoppingOrder','shopping_order_id');
|
||||
}
|
||||
|
||||
public function product()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Product','product_id');
|
||||
}
|
||||
|
||||
public function getFormattedPrice()
|
||||
{
|
||||
if (\App::getLocale() == "en") {
|
||||
return number_format($this->attributes['price'], 2, '.', ',');
|
||||
}
|
||||
return number_format($this->attributes['price'], 2, ',', '.');
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue