OrderItemInterface
interface OrderItemInterface implements AdjustableInterface, OrderAwareInterface
Interface OrderItemInterface
Constants
| STATE_COMPLETE |
Order item states |
| STATE_PARTIAL |
|
| STATE_UNCOMPLETE |
|
| PRODUCT_QUANTITY_REBATE |
|
| PRODUCT_PRICE_LIST_DISCOUNT |
|
| PRODUCT_GROUP_DISCOUNT |
|
| PRODUCT_GROUP_FIXED_DISCOUNT |
|
| PRODUCT_PRICE_LIST_AND_GROUP_DISCOUNT |
|
| CHECKOUT_ADDED_PRODUCT_ATTRIBUTE_VALUES_ID |
|
Methods
Return all adjustments attached to adjustable subject.
Get adjustments total.
Get item quantity.
Set quantity.
Get item product.
Get unit price of item.
Define the unit price of item.
Get item total.
Set item total.
Calculate total based on quantity and unit price.
Get selected attribute values for product in order item
Checks whether the item given as argument corresponds to the same cart item. Can be overwritten to enable merge quantities.
Merge the item given as argument corresponding to the same cart item.
Details
in AdjustableInterface at line 27
Collection|AdjustmentInterface[]
getAdjustments(null|string $type = null)
Return all adjustments attached to adjustable subject.
in AdjustableInterface at line 34
addAdjustment(AdjustmentInterface $adjustment)
Add adjustment.
in AdjustableInterface at line 41
removeAdjustment(AdjustmentInterface $adjustment)
Remove adjustment.
in AdjustableInterface at line 50
integer
getAdjustmentsTotal(null|string $type = null)
Get adjustments total.
in AdjustableInterface at line 57
removeAdjustments(string $type)
Remove adjustment.
in AdjustableInterface at line 62
clearAdjustments()
Clears all adjustments.
in AdjustableInterface at line 67
calculateAdjustmentsTotal()
Calculate adjustments total.
in OrderAwareInterface at line 23
OrderInterface
getOrder()
Return the order.
in OrderAwareInterface at line 30
setOrder(OrderInterface $order = null)
Set the order.
at line 40
int
getQuantity()
Get item quantity.
at line 47
setQuantity(int $quantity)
Set quantity.
at line 55
Product
getProduct()
Get item product.
at line 62
setProduct(Product $product)
Set product.
at line 69
int
getUnitPrice()
Get unit price of item.
at line 76
setUnitPrice(int $unitPrice)
Define the unit price of item.
at line 83
int
getTotal()
Get item total.
at line 90
setTotal(int $total)
Set item total.
at line 96
calculateTotal()
Calculate total based on quantity and unit price.
Take adjustments into account.
at line 103
Collection
getProductAttValues()
Get selected attribute values for product in order item
at line 114
bool
equals(OrderItemInterface $orderItem)
Checks whether the item given as argument corresponds to the same cart item. Can be overwritten to enable merge quantities.
at line 124
merge(OrderItemInterface $orderItem, bool $throwOnInvalid = true, float $qty)
Merge the item given as argument corresponding to the same cart item.