I am trying to programmatically create an order and invoice in Magento, but whenever I add products to my shopping cart, the price of each product is 0, which results in a NULL amount.
I also tried the moveToCustomerQuote method, but this generates a Magento Fault error that does not indicate that the customer quote (shopping cart identifier) does not exist.
Here is my code
$cart = $magi->execute("cart.create");
$add_customer = $magi->execute("cart_customer.set",array($cart,$customer));
$products = array(array(
"product_id" => 167,
"qty" => 50
));
$add_product = $magi->execute("cart_product.add",array($cart,$products));
Is there something that I am doing wrong, or is there another step I must take to get the product to display the price correctly?
source
share