Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function _insertQueueElements($container)
- {
- $bootstrap = $this->getInvokeArg('bootstrap');
- $env = $bootstrap->getEnv();
- $connection = 'sql/stock';
- Environment::getInstance()->processConnections($connection);
- SQL::init(
- NestedArrayHelper::findNestedKey($connection, 'host'),
- NestedArrayHelper::findNestedKey($connection, 'username'),
- NestedArrayHelper::findNestedKey($connection, 'password'),
- NestedArrayHelper::findNestedKey($connection, 'dbname'),
- get_class($this).'stocks'
- );
- SQL::selectConnection(get_class($this).'stocks');
- $xmlDocument = simplexml_load_string($container);
- $stockStorage = new SqlStockStorage(get_class($this).'stocks', 'order');
- foreach ($xmlDocument->StatusTrigger->OrderLines->OrderLine as $ItemLine) {
- $data['product_id'] = $ItemLine->ItemNumber;
- $data['color_id'] = $ItemLine->colorAXDimensionId;
- $data['size_id'] = $ItemLine->size;
- $stockStorage->setData($data);
- $stockStorage->saveOrder();
- unset($data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement