Jump to content

Unable to create order through API call


manish167

Recommended Posts

I am trying to make the api call to the webservices php file on the server to create an order but getting this error in the xml response..:Other error
This call to PrestaShop Web Services failed and returned an HTTP status of 500. That means: Internal Server Error.

 

I had already created the cart with items and this php file tries to convert the cart into an order..

Prestashop version:1.6.1.6

 

The log entry is given below..

 

ERROR:

[25-Jul-2016 06:53:41 US/Eastern] PHP Fatal error:  Uncaught exception 'PrestaShopException' with message 'Property OrderDetail->product_price is empty' in /home/user/public_html/shop/classes/ObjectModel.php:909Stack trace:#0 /home/user/public_html/shop/classes/ObjectModel.php(246): ObjectModelCore->validateFields()#1 /home/user/public_html/shop/classes/ObjectModel.php(487): ObjectModelCore->getFields()#2 /home/user/public_html/shop/classes/order/OrderDetail.php(802): ObjectModelCore->add(true, false)#3 /home/user/public_html/shop/classes/ObjectModel.php(445): OrderDetailCore->add(true, false)#4 /home/user/public_html/shop/classes/order/OrderDetail.php(653): ObjectModelCore->save()#5 /home/user/public_html/shop/classes/order/OrderDetail.php(678): OrderDetailCore->create(Object(Order), Object(Cart), Array, '8', 0, true, 0)#6 /home/user/public_html/shop/classes/PaymentModule.php(364): OrderDetailCore->createList(Object(Order), Object(Cart), '8', Array, 0, true, 0)#7 /home/user/public_html/shop/classes/order/O in /home/usre/public_html/shop/classes/ObjectModel.php on line 909

create_order.php

Link to comment
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
×
×
  • Create New...