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?

0

Just call $order->setPayment($paymentmethods)

  • 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( – user3738031 Jun 16 '14 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 '14 at 8:12
  • i had a third party module installed and thought that it was native model 8( – user3738031 Jun 18 '14 at 9:07

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