trait ManagesOrderItems

Methods

static 
bootManagesOrderItems()

No description

void
subtractStock()

Subtract cart item quantity from menu stock quantity

Collection
getOrderMenus()

Return all order menu by order_id

Collection
getOrderMenuOptions()

Return all order menu options by order_id

Collection
getOrderMenusWithOptions()

Return all order menus merged with order menu options

Collection
getOrderTotals()

Return all order totals by order_id

float
addOrderMenus(array $content)

Add cart menu items to order by order_id

bool
addOrderMenuOptions($orderMenuId, $menuId, $options)

Add cart menu item options to menu and order by, order_id and menu_id

bool
addOrderTotals(array $totals = [])

Add cart totals to order by order_id

addOrUpdateOrderTotal(array $total)

No description

calculateTotals()

No description

orderMenusQuery()

No description

orderMenuOptionsQuery()

No description

orderTotalsQuery()

No description

Details

at line 13
static bootManagesOrderItems()

No description

at line 20
protected handleOnBeforePaymentProcessed()

No description

at line 30
void subtractStock()

Subtract cart item quantity from menu stock quantity

Return Value

void

at line 61
Collection getOrderMenus()

Return all order menu by order_id

Return Value

Collection

at line 71
Collection getOrderMenuOptions()

Return all order menu options by order_id

Return Value

Collection

at line 81
Collection getOrderMenusWithOptions()

Return all order menus merged with order menu options

Return Value

Collection

at line 113
Collection getOrderTotals()

Return all order totals by order_id

Return Value

Collection

at line 125
float addOrderMenus(array $content)

Add cart menu items to order by order_id

Parameters

array $content

Return Value

float

at line 164
protected bool addOrderMenuOptions($orderMenuId, $menuId, $options)

Add cart menu item options to menu and order by, order_id and menu_id

Parameters

$orderMenuId
$menuId
$options

Return Value

bool

at line 193
bool addOrderTotals(array $totals = [])

Add cart totals to order by order_id

Parameters

array $totals

Return Value

bool

at line 206
addOrUpdateOrderTotal(array $total)

No description

Parameters

array $total

at line 214
calculateTotals()

No description

at line 247
orderMenusQuery()

No description

at line 252
orderMenuOptionsQuery()

No description

at line 257
orderTotalsQuery()

No description