protected function _applyEditedFieldValue($type, $config, $params, $entity, $value) { if ($config['id'] == 'sort_order') { $entity->setSortOrder(empty($value) ? '0' : $value); return $this; } else { return parent::_applyEditedFieldValue($type, $config, $params, $entity, $value); } }
protected function _applyEditedFieldValue($type, $config, $params, $entity, $value) { if ($config['id'] != 'store_id') { $entity->setStores($entity->getStoreId()); return parent::_applyEditedFieldValue($type, $config, $params, $entity, $value); } else { $entity->setStores($value); return $this; } }
protected function _applyEditedFieldValue($type, $config, $params, $entity, $value) { if ($config['id'] == 'qty') { $productId = $entity->getId(); $stockItem = Mage::getModel('cataloginventory/stock_item'); $stockItem->setData(array()); $stockItem->loadByProduct($productId)->setProductId($productId); if (isset($params['original_inventory_qty']) && strlen($params['original_inventory_qty']) > 0) { $stockItem->setQtyCorrection($item->getQty() - $originalQty); } $stockItem->setQty($value); $entity->setData('_blcg_gtp_stock_item', $stockItem); return $this; } return parent::_applyEditedFieldValue($type, $config, $params, $entity, $value); }