Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • ApiV2Controllers
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • OrderListGenerator
  • OrderObjectService
  • OrderReadService
  • OrderWriteService

Interfaces

  • OrderItemAttributeFactoryInterface

Class OrderWriteService

Class OrderWriteService

OrderWriteService implements OrderWriteServiceInterface
Package: Order
Category: System
Located at CoreServices/Order/OrderWriteService.inc.php

Methods summary

public
# __construct( OrderRepositoryInterface $orderRepository, OrderItemRepositoryInterface $orderItemRepository, OrderItemAttributeRepositoryFactoryInterface $orderItemAttributeRepositoryFactory, OrderTotalRepository $orderTotalRepository, OrderStatusHistoryStorage $orderStatusHistoryWriter, OrderServiceSettingsInterface $orderServiceSetting )

Class Constructor

Class Constructor

Parameters

$orderRepository
$orderItemRepository
$orderItemAttributeRepositoryFactory
$orderTotalRepository
$orderStatusHistoryWriter
$orderServiceSetting
public integer
# 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, StringType $comment = null, IdType $orderStatusId = null, KeyValueCollection $addonValues = null )

Create New Customer Order

Create New Customer Order

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

Parameters

$customerId
Customer ID
$customerStatusInfo
Customer Status Information
$customerNumber
Customer Number
$customerEmail
Customer Email
$customerTelephone
Customer Telephone
$vatIdNumber
VAT ID Number
$customerAddress
Address of the customer
$billingAddress
Billing address of the customer
$deliveryAddress
Delivery address of the customer
$orderItemCollection
Collection of the order items
$orderTotalCollection
Total collection of the order
$shippingType
Shipping type of the order
$paymentType
Payment type of the order
$currencyCode
Currency code of the order
$languageCode
Language code of the order
$comment
Optional comment of the order (default = null)
$orderStatusId
Optional id of the initial order status (default = null)
$addonValues

Optional key => value collection of addon values - e.g. cookies (default = null)

Returns

integer

Implementation of

OrderWriteServiceInterface::createNewCustomerOrder()
public integer
# 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, StringType $comment = null, IdType $orderStatusId = null, KeyValueCollection $addonValues = null )

Create New Standalone Order

Create New Standalone Order

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

Parameters

$customerNumber
Customer Number
$customerEmail
Customer Email
$customerTelephone
Customer Telephone
$vatIdNumber
VAT ID number of the customer.
$customerAddress
Address of the customer
$billingAddress
Billing address of the customer
$deliveryAddress
Delivery address of the customer
$orderItemCollection
Collection of the order items
$orderTotalCollection
Total collection of the order
$shippingType
Shipping type of the order
$paymentType
Payment type of the order
$currencyCode
Currency code of the order
$languageCode
Language code of the order
$comment
Optional comment of the order (default = null)
$orderStatusId
Optional id of the initial order status (default = null)
$addonValues

Optional key => value collection of addon values - e.g. cookies (default = null)

Returns

integer

Implementation of

OrderWriteServiceInterface::createNewStandaloneOrder()
public
# updateCustomerAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Customer Address

Update Customer Address

Updates the customers address.

Parameters

$orderId
Order ID which holds the current address
$newAddress
New address of the customer

Implementation of

OrderWriteServiceInterface::updateCustomerAddress()
public
# updateBillingAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Billing Address

Update Billing Address

Updates the customers billing address.

Parameters

$orderId
Order ID which holds the current address
$newAddress
New billing address

Implementation of

OrderWriteServiceInterface::updateBillingAddress()
public
# updateDeliveryAddress( IdType $orderId, AddressBlockInterface $newAddress )

Update Delivery Address

Update Delivery Address

Updates the customers delivery address.

Parameters

$orderId
Order ID which holds the current address
$newAddress
New delivery address

Implementation of

OrderWriteServiceInterface::updateDeliveryAddress()
public integer
# addOrderItem( IdType $orderId, OrderItemInterface $orderItem )

Add Order Item

Add Order Item

Adds an item to the order.

Parameters

$orderId
Order ID of the order to add the item
$orderItem
The order item to add

Returns

integer
Id of the StoredOrderItem

Implementation of

OrderWriteServiceInterface::addOrderItem()
public
# updateOrderItem( StoredOrderItemInterface $orderItem )

Update Order Item

Update Order Item

Updates an order item.

Parameters

$orderItem
The order item to update

Implementation of

OrderWriteServiceInterface::updateOrderItem()
public
# removeOrderItem( StoredOrderItemInterface $orderItem )

Remove Order Item

Remove Order Item

Removes an item from an order.

Parameters

$orderItem
The order item to remove

Implementation of

OrderWriteServiceInterface::removeOrderItem()
public integer
# addOrderItemAttribute( IdType $orderItemId, OrderItemAttributeInterface $orderItemAttribute )

Add Order Item Attribute

Add Order Item Attribute

Adds an order item attribute to the order

Parameters

$orderItemId
Order ID of the order item to add the attribute.
$orderItemAttribute
The order item attribute to add

Returns

integer
Id of stored order item attribute.

Implementation of

OrderWriteServiceInterface::addOrderItemAttribute()
public
# updateOrderItemAttribute( StoredOrderItemAttributeInterface $orderItemAttribute )

Update Order Item Attribute

Update Order Item Attribute

Updates an item attribute of an order.

Parameters

$orderItemAttribute
The order item attribute to update

Implementation of

OrderWriteServiceInterface::updateOrderItemAttribute()
public
# removeOrderItemAttribute( StoredOrderItemAttributeInterface $orderItemAttribute )

Remove Order Item Attribute

Remove Order Item Attribute

Removes an item attribute of an order

Parameters

$orderItemAttribute
The order item attribute to remove

Implementation of

OrderWriteServiceInterface::removeOrderItemAttribute()
public integer
# addOrderTotal( IdType $orderId, OrderTotalInterface $orderTotal )

Add Order Total

Add Order Total

Adds a total price to an order.

Parameters

$orderId
Order Id of the order to add the total price
$orderTotal
Total price to add to the order

Returns

integer
Id of stored order total.

Implementation of

OrderWriteServiceInterface::addOrderTotal()
public
# updateOrderTotal( StoredOrderTotalInterface $orderTotal )

Update Order Total

Update Order Total

Updates a total price of an order

Parameters

$orderTotal
The total price of an order to update

Implementation of

OrderWriteServiceInterface::updateOrderTotal()
public
# removeOrderTotal( StoredOrderTotalInterface $orderTotal )

Remove Order Total

Remove Order Total

Removes a total price of an order

Parameters

$orderTotal
The total price of an order to remove

Implementation of

OrderWriteServiceInterface::removeOrderTotal()
public
# updateShippingType( IdType $orderId, OrderShippingType $newShippingType )

Update Shipping Type

Update Shipping Type

Updates the shipping type of an order.

Parameters

$orderId
Order ID of the order to update
$newShippingType
The new shipping type

Implementation of

OrderWriteServiceInterface::updateShippingType()
public
# updatePaymentType( IdType $orderId, OrderPaymentType $newPaymentType )

Update Payment Type

Update Payment Type

Updates the payment type of an order.

Parameters

$orderId
Order ID of the order to update
$newPaymentType
The new payment type

Implementation of

OrderWriteServiceInterface::updatePaymentType()
public
# updateComment( IdType $orderId, StringType $newComment )

Update Comment

Update Comment

Updates the comment of an order.

Parameters

$orderId
Order ID of the order to update
$newComment
The new comment

Implementation of

OrderWriteServiceInterface::updateComment()
public
# updateOrderStatus( IdType $orderId, IdType $newOrderStatusId, StringType $comment, BoolType $customerNotified )

Update Order Status

Update Order Status

Updates the order status of an order.

Parameters

$orderId
Order ID of the order to update
$newOrderStatusId
The new status Id
$comment
Comment of the order status history item
$customerNotified
Customer notified flag

Implementation of

OrderWriteServiceInterface::updateOrderStatus()
public OrderWriteService
# updateOrder( OrderInterface $order )

Update Order

Update Order

Updates the provided order.

Parameters

$order
Order to update

Returns

OrderWriteService
Same instance for chained method calls.

Implementation of

OrderWriteServiceInterface::updateOrder()
public
# removeOrderById( IdType $orderId )

Remove Order by ID

Remove Order by ID

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

Parameters

$orderId
Order ID of the order to remove

Implementation of

OrderWriteServiceInterface::removeOrderById()

Properties summary

protected OrderRepository $orderRepository
#
protected OrderItemRepository $orderItemRepository
#
protected OrderItemAttributeRepositoryFactory $orderItemAttributeRepositoryFactory
#
protected OrderTotalRepository $orderTotalRepository
#
protected OrderStatusHistoryStorage $orderStatusHistoryStorage

OrderStatusHistoryStorage

OrderStatusHistoryStorage

#
protected OrderServiceSettingsInterface $orderServiceSettings
#
API documentation generated by ApiGen