I get a rather strange error when trying to create a new order through Magento API V1.0. Here is the main workflow of my code:
- Create a shopping cart using the
cart.create method. - Set the client as a guest using the
cart_customer.set method. - Add products to the cart using the
cart_product.add method. - Create an order using the
cart.order method.
At this point, the cart.order method throws a SoapFault exception with the message "Calling the member function setFinalPrice () for a non-object." The same exception occurs if I replace the cart.order method cart.order other methods, such as cart.info or cart_product.list .
Since the exception message doesn't seem very descriptive, I was wondering if anyone else had ever come across this.
Thanks.
UPDATE: The problem is that I add products to the cart using my SKUs when calling the cart_product.add method. An exception is no longer thrown when using product identifiers instead of SKUs (I suspect this might be a bug). However, at this point, the cart.order method returns false, so the order has not yet been created.
api magento
Epicurus
source share