Jump to content

Add checkout message from API


Vallekano
 Share

Recommended Posts

Hello,

I have been creating orders in different Prestashop installations since time ago but now I would like to add a checkout message to the orders and I cannot find the proper way to do this.

After creating the order in the system I am creating a "customer_thread" setting the "id_order" and the "id_customer". After that, I add a message to this thread.

The thread is created properly but I cannot see it from order details page. It still says 0 messages.

If I go to the customer details page, I can see the message there.

Is this the way to add a message to the order?

var thread = customerThreadFactory.Add(new customer_thread()
{
	id_order = idOrder,
	id_customer = idCustomer,
	id_lang = 1,
	id_contact = 2,
	token = "xxxxxxxx"
});

var msg = messageCustomerFactory.Add(new customer_message()
{
	message = comments,
	id_customer_thread = thread.id
});

 

Thnaks,

Oscar.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More