Skip to content

Instantly share code, notes, and snippets.

@nhp
Created April 16, 2013 06:53
Show Gist options
  • Save nhp/5393905 to your computer and use it in GitHub Desktop.
Save nhp/5393905 to your computer and use it in GitHub Desktop.
$this->db_access->write("DB_NAME", "UPDATE `cataloginventory_stock_item` SET `qty` = '".$qty."', `is_in_stock` = '".$is_in_stock."' WHERE `product_id` = '".$product_id."'");
$this->db_access->write("DB_NAME", "UPDATE `cataloginventory_stock_status` SET `qty` = '".$qty."',`stock_status` = '".$is_in_stock."' WHERE `product_id` = '".$product_id."'");
get_id_by_sku: $id = $this->db_access->read("DB_NAME", "SELECT `entity_id` FROM `catalog_product_entity` WHERE
`sku` = '".$sku."' LIMIT 1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment