Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Difference between saving methods
 
rgoodrow
Member
 
Total Posts:  31
Joined:  2013-04-23
 

I’m currently using the following code to update/save invoices & orders after creating a partial invoice.

$invoice->getOrder()->setIsInProcess(true);
                    
Mage::getModel('core/resource_transaction')
                        ->
addObject($invoice)
                        ->
addObject($invoice->getOrder())
                    ;
                    
$invoice->save();
                    
$order->save();

To me, it looks like both $invoice->save() & the adding an object to the resource transaction do the same thing.

Should I still be using both, or should I only use one or the other?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top