1

How can this be done in PHP? I can't find anything in the docs.

1 Answer 1

2

To add orders programmatically, you can do so by using the Commerce_OrderModel class.

Like so:

$order = new Commerce_OrderModel();
$order->email = '[email protected]';

// Add your products here and other order info...
// .................

$success = craft()->commerce_orders->saveOrder($order);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.