eZ Commerce provides a global Twig variable
ses which is available in all templates.
The variable provides the
profile method which contains information about the current customer.
If the user has a customer number, eZ Commerce automatically fetches customer information from the ERP.
The data is stored in the session and is provided by the variable
Subsequent calls do not initiate a new request to the ERP because the data from the ERP is cached and handled by the Symfony session handlers.
eZ Commerce provides a standard template for displaying customer data:
Getting customer profile data¶
ses.profile in the template returns the currently logged-in profile, you are able to use all read-only members from the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
You can use any data from
CustomerProfileData, see example in the model.
Getting data from a buyer party¶
1 2 3 4 5 6 7 8 9 10
To output the telephone number of the contact, point to the member variable
$phoneNumber of the