Skip to content

Instantly share code, notes, and snippets.

@salmanindia
Last active August 29, 2015 14:10
Show Gist options
  • Save salmanindia/bc77069c840d660b3928 to your computer and use it in GitHub Desktop.
Save salmanindia/bc77069c840d660b3928 to your computer and use it in GitHub Desktop.
Flipkart Add Product API
class ModelCatalogUpload extends Model {
public function getDataFromFile($file)
{$this->csv2array($file);}
public function selectProduct()
{ $this->delProducts();
$sql = "SELECT * FROM temp_products ";
$query = $this->db->query($sql);
$records = $query->rows;
foreach ($records as $data)
{$this->addProduct($data);}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment