Magento

How to create Magento shipment programmaticaly?

Posted on:

In case someone will need this, it’s quite simple: $order = Mage::getModel(‘sales/order’)->load( 1234 ); $shipment = Mage::getModel(‘sales/service_order’, $order)->prepareShipment(array()); $shipment->register(); $shipment->getOrder()->setCustomerNoteNotify(false); $shipment->getOrder()->setIsInProcess(true); $transactionSave = Mage::getModel(‘core/resource_transaction’)->addObject($shipment)->addObject($shipment->getOrder())->save();  

Magento

Magento FACT Finder export

Posted on:

Preparing such export is quite easy, so let’s begin with adding new button in products listing: in app/code/core/Mage/Adminhtml/Block/Catalog/Product.php in _prepareLayout() function add such code: $this->_addButton(‘export_fact’, array( ‘label’ => […]