I have been creating orders in several prestashop installations without any issue but now I would like to add checkout customer comments as well.
This is what I am doing:
// Adding the order
order = orderFactory.Add(order);
// Adding a message, setting the order_id, customer_id, message and cart_id
var msg = messageFactory.Add(new message()
{
id_order = order.id,
id_customer = prestashopCustomer,
Message = customerComments,
id_cart = cart.id
});
The result is the order properly created in the website but the message is only saved in "message" table, NOT in "order_message" table and I cannot not see the comment from backend.
I have done this as well as an additional step and the message is also stored in "customer_message" table but again, nothing in "order_message" and I think I need a record in that table to be able to see the comment in the backend.
// Adding the message again as a customer message (I think this is not necessary)
var msg2 = messageCustomerFactory.Add(new customer_message()
{
message = customerComments,
id_customer_thread = msg.id
});
I have been creating orders in several prestashop installations without any issue but now I would like to add checkout customer comments as well.
This is what I am doing:
The result is the order properly created in the website but the message is only saved in "message" table, NOT in "order_message" table and I cannot not see the comment from backend.
I have done this as well as an additional step and the message is also stored in "customer_message" table but again, nothing in "order_message" and I think I need a record in that table to be able to see the comment in the backend.
Any idea what I am missing?