Orderhistory is an additional eZ Commerce module that is based on the standard eZ Commerce functionality. The user has the possibilty to see an overview and a details of his orders or other documents from the ERP system. He will see documents based on online purchases as well as order placed e.g. by a telephone call.
On the detail page he can see the buyer, delivery address, ordered items and some more details about the order, like status, delivery and payment selection.
He can also use the addToBasket functionality here and speed up the order process if he e.g. often orders the same items.
Orderhistory supports different document types:
Make sure to the users have been granted access to the orderhistory. "siso_policy orderhistory_view" must be set!
Orderhistory is using semantic configuration, so it only exposes parameters that are allowed to be configurable.
However it is possible to override this configuration by siteaccess. Therefore an event is thrown, before the configuration is used and you can implement a listener, that will be able to change this configuration. eZ Commerce makes usage of this event for displaying of the local orders. Check our FAQ to find out, how to implement a new configuration listener.
You can configure which columns (per document type) you want to display. The columns in the list are sortable.
The column identifier is the block name from the views/OrderHistory/Components/fields.html.twig without the suffix '_field'. Read more...
You can configure how the columns (per document type) in the list view are sorted. Check the DataTables plugin configuration to see all sorting options.
For the date it is enough to use the 'datetime' sorting. Following date-formats are supported:
#combination of these characters is allowed: Y,m,d
#accepted delimiters are: "/" , "." and "-"
#Example: d.m.Y, Y/m/d, d-m-Y...
You can also configure (per document type) by which column the list will be sorted by default:
You can configure the ERP date format and also the date format that will be used in the shop:
The semantic configuration (orderhistory.yml) is read and prepared in the ConfigurationReaderService. However an event is dispatched here, that allows you to modify the configuration, if you e.g. need to change it by siteaccess.
Therefore you need to implement a 'siso_order_history.read_configuration' listener.
Add a configuration by siteaccess:
Implement an event listener:
The orderhistory is using a list of templates which can be overridden if required.
Find recipes in cookbook...
The API section describes how to extend the orderhistory.
The section ERP-Messages describes which messages are used towards the ERP system.