cancel
Showing results for 
Search instead for 
Did you mean: 

How do we get email id of the user to whom we want to send the email after Order Placed

former_member628401
Participant
0 Kudos
253

Hi Experts ,

As we knew , Once order placed we will get email confirmation mail and this is OOB of Hybris .

Can anyone help me to understand How do we get email id of the user to whom we want to send the email after Order Placed.

It would be good help for me .

Regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

You need to set userModel to you model

check the bellow code.

final OrderModel orderModel = new OrderModel(); final OrderProcessModel process = new OrderProcessModel(); final BaseStoreModel baseStoreModel = getBaseStoreService().getCurrentBaseStore();

             Date date = new Date(System.currentTimeMillis());
             
             orderModel.setOrderNumber(orderData.getCode());
             orderModel.setSite(baseSiteService.getCurrentBaseSite());
             orderModel.setUser(userService.getCurrentUser()); 
             orderModel.setStore(baseStoreModel);
             orderModel.setCurrency(commonI18NService.getBaseCurrency());
             orderModel.setDate(date);
             orderModel.setLanguage(commonI18NService.getCurrentLanguage());
             
             orderModel.setGuid(orderData.getCode());