Documentation

OrderWriteService
in package
implements OrderWriteServiceInterface

Class OrderWriteService

Tags
category

System

Interfaces, Classes and Traits

OrderWriteServiceInterface
Interface OrderWriteServiceInterface

Table of Contents

$deleteHistoryService  : DeleteHistoryWriteService
$orderItemAttributeRepositoryFactory  : OrderItemAttributeRepositoryFactory
$orderItemRepository  : OrderItemRepository
$orderRepository  : OrderRepository
$orderServiceSettings  : OrderServiceSettingsInterface
$orderStatusHistoryStorage  : OrderStatusHistoryStorage
$orderTotalRepository  : OrderTotalRepository
__construct()  : mixed
Class Constructor
addOrderItem()  : int
Add Order Item
addOrderItemAttribute()  : int
Add Order Item Attribute
addOrderStatusHistoryEntry()  : mixed
Add Order Status History Entry
addOrderTotal()  : int
Add Order Total
createNewCustomerOrder()  : int
Create New Customer Order
createNewStandaloneOrder()  : int
Create New Standalone Order
removeOrderById()  : mixed
Remove Order by ID
removeOrderItem()  : mixed
Remove Order Item
removeOrderItemAttribute()  : mixed
Remove Order Item Attribute
removeOrderTotal()  : mixed
Remove Order Total
updateBillingAddress()  : mixed
Update Billing Address
updateComment()  : mixed
Update Comment
updateCustomerAddress()  : mixed
Update Customer Address
updateDeliveryAddress()  : mixed
Update Delivery Address
updateOrder()  : OrderWriteService
Update Order
updateOrderItem()  : mixed
Update Order Item
updateOrderItemAttribute()  : mixed
Update Order Item Attribute
updateOrderStatus()  : mixed
Update Order Status
updateOrderTotal()  : mixed
Update Order Total
updatePaymentType()  : mixed
Update Payment Type
updateShippingType()  : mixed
Update Shipping Type

Properties

Methods

__construct()

Class Constructor

public __construct(OrderRepositoryInterface $orderRepository, OrderItemRepositoryInterface $orderItemRepository, OrderItemAttributeRepositoryFactoryInterface $orderItemAttributeRepositoryFactory, OrderTotalRepository $orderTotalRepository, OrderStatusHistoryStorage $orderStatusHistoryWriter, OrderServiceSettingsInterface $orderServiceSetting, DeleteHistoryWriteService $deleteHistoryService) : mixed
Parameters
$orderRepository : OrderRepositoryInterface
$orderItemRepository : OrderItemRepositoryInterface
$orderItemAttributeRepositoryFactory : OrderItemAttributeRepositoryFactoryInterface
$orderTotalRepository : OrderTotalRepository
$orderStatusHistoryWriter : OrderStatusHistoryStorage
$orderServiceSetting : OrderServiceSettingsInterface
$deleteHistoryService : DeleteHistoryWriteService
Return values
mixed

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

createNewCustomerOrder()

Create New Customer Order

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

Creates a new customer order and returns the order ID as an integer.

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 kilo gram

$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

createNewStandaloneOrder()

Create New Standalone Order

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

Creates a new standalone order (e.g. for guests) and returns the order ID as an integer.

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

removeOrderById()

Remove Order by ID

public removeOrderById(IdType $orderId) : mixed

Removes a specific order, depending on the provided order ID.

Parameters
$orderId : IdType

Order ID of the order to remove

Return values
mixed

updateComment()

Update Comment

public updateComment(IdType $orderId, StringType $newComment) : mixed

Updates the comment of an order.

Parameters
$orderId : IdType

Order ID of the order to update

$newComment : StringType

The new comment

Return values
mixed

updateOrderStatus()

Update Order Status

public updateOrderStatus(IdType $orderId, IntType $newOrderStatusId, StringType $comment, BoolType $customerNotified[, IdType $customerId = null ]) : mixed

Updates the order status of an order.

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

Search results