OrderWriteServiceInterface
in
Interface OrderWriteServiceInterface
Tags
Table of Contents
- addOrderItem() : int
- Adds an item to the order.
- addOrderItemAttribute() : int
- Adds an order item attribute to the order.
- addOrderStatusHistoryEntry() : mixed
- Add Order Status History Entry
- addOrderTotal() : int
- Adds a total price to an order.
- createNewCustomerOrder() : int
- Creates a new customer order and returns the order ID as an integer.
- createNewStandaloneOrder() : int
- Creates a new standalone order (e.g. for guests) and returns the order ID as an integer.
- removeOrderById() : mixed
- Removes a specific order, depending on the provided order ID.
- removeOrderItem() : mixed
- Removes an item from an order.
- removeOrderItemAttribute() : mixed
- Removes an item attribute of an order.
- removeOrderTotal() : mixed
- Removes a total price of an order.
- updateBillingAddress() : mixed
- Updates the customers billing address.
- updateComment() : mixed
- Updates the comment of an order.
- updateCustomerAddress() : mixed
- Updates the customers address.
- updateDeliveryAddress() : mixed
- Updates the customers delivery address.
- updateOrder() : mixed
- Updates the provided order.
- updateOrderItem() : mixed
- Updates an order item.
- updateOrderItemAttribute() : mixed
- Updates an item attribute of an order.
- updateOrderStatus() : mixed
- Updates the order status of an order.
- updateOrderTotal() : mixed
- Updates a total price of an order.
- updatePaymentType() : mixed
- Updates the payment type of an order.
- updateShippingType() : mixed
- Updates the shipping type of an order.
Methods
addOrderItem()
Adds an item to the order.
public
addOrderItem(IdType $orderId, OrderItemInterface $orderItem) : int
Parameters
- $orderId : IdType
-
Order ID of the order to add the item.
- $orderItem : OrderItemInterface
-
The order item to add.
Return values
int —ID of the StoredOrderItem.
addOrderItemAttribute()
Adds an order item attribute to the order.
public
addOrderItemAttribute(IdType $orderItemId, OrderItemAttributeInterface $orderItemAttribute) : int
Parameters
- $orderItemId : IdType
-
Order ID of the order item to add the attribute.
- $orderItemAttribute : OrderItemAttributeInterface
-
The order item attribute to add.
Return values
int —ID of stored order item attribute.
addOrderStatusHistoryEntry()
Add Order Status History Entry
public
addOrderStatusHistoryEntry(IdType $orderId, StringType $comment, IdType $customerId) : mixed
Add an order status history entry to an order, without changing the status or notifying the customer.
Parameters
- $orderId : IdType
-
Order ID of the order to update
- $comment : StringType
-
Comment of the order status history item
- $customerId : IdType
-
Customer ID of the admin
Return values
mixed —addOrderTotal()
Adds a total price to an order.
public
addOrderTotal(IdType $orderId, OrderTotalInterface $orderTotal) : int
Parameters
- $orderId : IdType
-
Order ID of the order to add the total price.
- $orderTotal : OrderTotalInterface
-
Total price to add to the order.
Return values
int —ID of stored order total.
createNewCustomerOrder()
Creates a new customer order and returns the order ID as an integer.
public
createNewCustomerOrder(IdType $customerId, CustomerStatusInformation $customerStatusInfo, StringType $customerNumber, EmailStringType $customerEmail, StringType $customerTelephone, StringType $vatIdNumber, AddressBlockInterface $customerAddress, AddressBlockInterface $billingAddress, AddressBlockInterface $deliveryAddress, OrderItemCollection $orderItemCollection, OrderTotalCollection $orderTotalCollection, OrderShippingType $shippingType, OrderPaymentType $paymentType, CurrencyCode $currencyCode, LanguageCode $languageCode, DecimalType $totalWeight[, StringType $comment = null ][, IntType $orderStatusId = null ][, KeyValueCollection $addonValues = null ]) : int
Parameters
- $customerId : IdType
-
Customer ID.
- $customerStatusInfo : CustomerStatusInformation
-
Customer Status Information.
- $customerNumber : StringType
-
Customer Number.
- $customerEmail : EmailStringType
-
Customer Email.
- $customerTelephone : StringType
-
Customer Telephone.
- $vatIdNumber : StringType
-
VAT ID Number.
- $customerAddress : AddressBlockInterface
-
Address of the customer.
- $billingAddress : AddressBlockInterface
-
Billing address of the customer.
- $deliveryAddress : AddressBlockInterface
-
Delivery address of the customer.
- $orderItemCollection : OrderItemCollection
-
Collection of the order items.
- $orderTotalCollection : OrderTotalCollection
-
Total collection of the order.
- $shippingType : OrderShippingType
-
Shipping type of the order.
- $paymentType : OrderPaymentType
-
Payment type of the order.
- $currencyCode : CurrencyCode
-
Currency code of the order.
- $languageCode : LanguageCode
-
Language code of the order.
- $totalWeight : DecimalType
-
Total weight of the order in kg.
- $comment : StringType = null
-
Optional comment of the order (default = null).
- $orderStatusId : IntType = null
-
Optional id of the initial order status (default = null).
- $addonValues : KeyValueCollection = null
-
Optional key => value collection of addon values - e.g. cookies (default = null).
Return values
int —Order ID.
createNewStandaloneOrder()
Creates a new standalone order (e.g. for guests) and returns the order ID as an integer.
public
createNewStandaloneOrder(StringType $customerNumber, EmailStringType $customerEmail, StringType $customerTelephone, StringTYpe $vatIdNumber, AddressBlockInterface $customerAddress, AddressBlockInterface $billingAddress, AddressBlockInterface $deliveryAddress, OrderItemCollection $orderItemCollection, OrderTotalCollection $orderTotalCollection, OrderShippingType $shippingType, OrderPaymentType $paymentType, CurrencyCode $currencyCode, LanguageCode $languageCode, DecimalType $totalWeight[, StringType $comment = null ][, IntType $orderStatusId = null ][, KeyValueCollection $addonValues = null ]) : int
Parameters
- $customerNumber : StringType
-
Customer Number.
- $customerEmail : EmailStringType
-
Customer Email.
- $customerTelephone : StringType
-
Customer Telephone.
- $vatIdNumber : StringTYpe
-
VAT ID number of the customer.
- $customerAddress : AddressBlockInterface
-
Address of the customer.
- $billingAddress : AddressBlockInterface
-
Billing address of the customer.
- $deliveryAddress : AddressBlockInterface
-
Delivery address of the customer.
- $orderItemCollection : OrderItemCollection
-
Collection of the order items.
- $orderTotalCollection : OrderTotalCollection
-
Total collection of the order.
- $shippingType : OrderShippingType
-
Shipping type of the order.
- $paymentType : OrderPaymentType
-
Payment type of the order.
- $currencyCode : CurrencyCode
-
Currency code of the order.
- $languageCode : LanguageCode
-
Language code of the order.
- $totalWeight : DecimalType
-
Total weight of the order in kg.
- $comment : StringType = null
-
Optional comment of the order (default = null).
- $orderStatusId : IntType = null
-
Optional id of the initial order status (default = null).
- $addonValues : KeyValueCollection = null
-
Optional key => value collection of addon values - e.g. cookies (default = null).
Return values
int —Order ID.
removeOrderById()
Removes a specific order, depending on the provided order ID.
public
removeOrderById(IdType $orderId) : mixed
Parameters
- $orderId : IdType
-
Order ID of the order to remove.
Return values
mixed —removeOrderItem()
Removes an item from an order.
public
removeOrderItem(StoredOrderItemInterface $orderItem) : mixed
Parameters
- $orderItem : StoredOrderItemInterface
-
The order item to remove.
Return values
mixed —removeOrderItemAttribute()
Removes an item attribute of an order.
public
removeOrderItemAttribute(StoredOrderItemAttributeInterface $orderItemAttribute) : mixed
Parameters
- $orderItemAttribute : StoredOrderItemAttributeInterface
-
The order item attribute to remove.
Return values
mixed —removeOrderTotal()
Removes a total price of an order.
public
removeOrderTotal(StoredOrderTotalInterface $orderTotal) : mixed
Parameters
- $orderTotal : StoredOrderTotalInterface
-
The total price of an order to remove.
Return values
mixed —updateBillingAddress()
Updates the customers billing address.
public
updateBillingAddress(IdType $orderId, AddressBlockInterface $newAddress) : mixed
Parameters
- $orderId : IdType
-
Order ID which holds the current address.
- $newAddress : AddressBlockInterface
-
New billing address.
Return values
mixed —updateComment()
Updates the comment of an order.
public
updateComment(IdType $orderId, StringType $newComment) : mixed
Parameters
- $orderId : IdType
-
Order ID of the order to update.
- $newComment : StringType
-
The new comment.
Return values
mixed —updateCustomerAddress()
Updates the customers address.
public
updateCustomerAddress(IdType $orderId, AddressBlockInterface $newAddress) : mixed
Parameters
- $orderId : IdType
-
Order ID which holds the current address.
- $newAddress : AddressBlockInterface
-
New address of the customer.
Return values
mixed —updateDeliveryAddress()
Updates the customers delivery address.
public
updateDeliveryAddress(IdType $orderId, AddressBlockInterface $newAddress) : mixed
Parameters
- $orderId : IdType
-
Order ID which holds the current address.
- $newAddress : AddressBlockInterface
-
New delivery address.
Return values
mixed —updateOrder()
Updates the provided order.
public
updateOrder(OrderInterface $order) : mixed
Parameters
- $order : OrderInterface
-
Order to update.
Return values
mixed —updateOrderItem()
Updates an order item.
public
updateOrderItem(StoredOrderItemInterface $orderItem) : mixed
Parameters
- $orderItem : StoredOrderItemInterface
-
The order item to update.
Return values
mixed —updateOrderItemAttribute()
Updates an item attribute of an order.
public
updateOrderItemAttribute(StoredOrderItemAttributeInterface $orderItemAttribute) : mixed
Parameters
- $orderItemAttribute : StoredOrderItemAttributeInterface
-
The order item attribute to update.
Return values
mixed —updateOrderStatus()
Updates the order status of an order.
public
updateOrderStatus(IdType $orderId, IntType $newOrderStatusId, StringType $comment, BoolType $customerNotified[, IdType $customerId = null ]) : mixed
Parameters
- $orderId : IdType
-
Order ID of the order to update.
- $newOrderStatusId : IntType
-
The new status ID.
- $comment : StringType
-
Comment of the order status history item.
- $customerNotified : BoolType
-
Customer notified flag.
- $customerId : IdType = null
-
Customer ID of the admin account.
Return values
mixed —updateOrderTotal()
Updates a total price of an order.
public
updateOrderTotal(StoredOrderTotalInterface $orderTotal) : mixed
Parameters
- $orderTotal : StoredOrderTotalInterface
-
The total price of an order to update.
Return values
mixed —updatePaymentType()
Updates the payment type of an order.
public
updatePaymentType(IdType $orderId, OrderPaymentType $newPaymentType) : mixed
Parameters
- $orderId : IdType
-
Order ID of the order to update.
- $newPaymentType : OrderPaymentType
-
The new payment type.
Return values
mixed —updateShippingType()
Updates the shipping type of an order.
public
updateShippingType(IdType $orderId, OrderShippingType $newShippingType) : mixed
Parameters
- $orderId : IdType
-
Order ID of the order to update.
- $newShippingType : OrderShippingType
-
The new shipping type.