0

I have payment method:

$paymentmethods = Mage::getModel('marketplace/paymentmethods');
            $paymentmethods->load(1);

and new order:

$order = Mage::getModel('sales/order')
    ->setIncrementId($reservedOrderId)
    ->setStoreId($storeId)
    ->setQuoteId(0);

how can i add payment method information with id = 1, to my new order? is it possible?

1 Answer 1

0

Just call $order->setPayment($paymentmethods)

3
  • not work: Recoverable Error: Argument 1 passed to Mage_Sales_Model_Order::setPayment() must be an instance of Mage_Sales_Model_Order_Payment, instance of Webkul_Marketplace_Model_Paymentmethods given. 8( Jun 16, 2014 at 6:24
  • This means that Webkul_Marketplace_Model_Paymentmethods is not an actual payment method. What is the purpose of this class, and what magento class does it extend?
    – Alex Dinca
    Jun 16, 2014 at 8:12
  • i had a third party module installed and thought that it was native model 8( Jun 18, 2014 at 9:07

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