OrderInterface
interface OrderInterface implements TimestampableInterface
Interface OrderInterface
Constants
| STATE_ADD_TO_CART |
ORDER STATES |
| STATE_SHIPPING |
|
| STATE_ADDRESS |
|
| PENDING |
|
| PAYMENT |
|
| STATE_CARD_PAYMENT |
|
| DELIVERED |
|
| CANCELED |
|
| FINISHED |
|
| FINISHED_PARTIAL |
|
| PROCESSING |
|
| ON_BACK_ORDER_PAYED |
TODO start delete |
| AWAITING_PAY_PAL_PAYMENT |
|
| PAYMENT_ERROR |
|
| ON_BACK_ORDER_NOT_PAYED |
|
| JQ_GRID_ANONYMOUS |
end delete |
| JQ_GRID_NO_SHIPPING |
|
| JQ_GRID_NO_COUNTRY |
|
| JQ_GRID_NO_COMPANY |
|
| FINISHED_ORDER_STATES |
These two constants must match, first one is for SQL 'IN' statement, second one is for iterations and usage in twig |
| FINISHED_ORDER_STATES_ARRAY |
|
| APPROVED_ORDER_STATES |
|
| APPROVED_ORDER_STATES_ARRAY |
|
| NOT_FINISHED_ORDER_STATES_STRING |
|
| NOT_FINISHED_ORDER_STATES_ARRAY |
|
| CAN_CONTINUE_STATES_STRING |
|
| CAN_CONTINUE_STATES_ARRAY |
|
Methods
Has the order been completed by user and can be handled.
Mark the order as completed.
Return completion date.
Get order items.
Set items.
Returns number of order items.
Get items total.
Calculate items total based on the items unit prices and quantities.
Get order total.
Set total.
Calculate total.
Returns total quantity of items in cart.
Checks whether the cart is empty or not.
Clears all items in cart.
Get order state.
Set order state.
No description
No description
No description
No description
No description
Details
in TimestampableInterface at line 21
mixed
getCreatedAt()
in TimestampableInterface at line 26
mixed
getUpdatedAt()
in TimestampableInterface at line 33
mixed
setCreatedAt(DateTime $createdAt)
in TimestampableInterface at line 40
mixed
setUpdatedAt(DateTime $updatedAt)
at line 66
bool
isCompleted()
Has the order been completed by user and can be handled.
at line 71
complete()
Mark the order as completed.
at line 78
DateTime
getCompletedAt()
Return completion date.
at line 85
setCompletedAt(DateTime $completedAt = null)
Set completion time.
at line 92
Collection|OrderItemInterface[]
getItems()
Get order items.
at line 99
setItems(Collection $items)
Set items.
at line 106
integer
countItems()
Returns number of order items.
at line 115
addItem(OrderItemInterface $item, float $price, float $qty)
Adds item to order.
at line 122
removeItem(OrderItemInterface $item)
Remove item from order.
at line 131
Boolean
hasItem(OrderItemInterface $item)
Has item in order?
at line 138
integer
getItemsTotal()
Get items total.
at line 144
calculateItemsTotal()
Calculate items total based on the items unit prices and quantities.
at line 151
integer
getTotal()
Get order total.
at line 158
setTotal(integer $total)
Set total.
at line 164
calculateTotal()
Calculate total.
Items total + Adjustments total.
at line 171
getTotalItems()
deprecated
deprecated
Alias of {@link countItems()}.
at line 178
integer
getTotalQuantity()
Returns total quantity of items in cart.
at line 185
Boolean
isEmpty()
Checks whether the cart is empty or not.
at line 190
clearItems()
Clears all items in cart.
at line 197
string
getState()
Get order state.
at line 204
setState(string $state)
Set order state.
at line 211
User
getUser()
Get user.
at line 218
setUser(User $user)
Set user.