Created
September 15, 2013 14:32
-
-
Save ryaan-anthony/6571251 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class Custom_ERP_Model_Observer | |
| { | |
| public function implementOrderStatus(Varien_Event_Observer $observer) | |
| { | |
| if ($this->_supplierArray) { | |
| foreach ($this->_supplierArray as $supplierID => $productList) { | |
| $resource = Mage::getSingleton('core/resource'); | |
| $writeConnection = $resource->getConnection('core_write'); | |
| $table = $resource->getTableName('erp_order_purchase'); | |
| $sql2 = "INSERT INTO {$table} ( | |
| `order_id` , | |
| `supplier_id` , | |
| `order_number` , | |
| `order_date` , | |
| `eta` , | |
| `status_id` , | |
| `isis_export` , | |
| `isis_export_date` , | |
| `comments` , | |
| `order_type` , | |
| `sales_order_id` , | |
| `sales_order_number` , | |
| `sales_order_invoice` , | |
| `ship_to_name` , | |
| `ship_to_street` , | |
| `ship_to_city` , | |
| `ship_to_postcode` , | |
| `ship_to_region` , | |
| `ship_to_telephone` , | |
| `ship_to_id` , | |
| `customer_id` , | |
| `ship_to_linetwo` | |
| ) | |
| VALUES (NULL , '1', '1', '1', '1', '1', '1', NULL, '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '12', NULL); | |
| "; | |
| $writeConnection->query($sql2); | |
| } | |
| } | |
| return $this; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment