RuletZ Posted October 2, 2010 Share Posted October 2, 2010 E' possibile modificare il file AdminImport.php ed ottenere che nel campo ID prodotti si possa inserire nell'import anche del testo e non solo numeri?Ciao e grazie. Link to comment Share on other sites More sharing options...
RuletZ Posted October 2, 2010 Author Share Posted October 2, 2010 Credo che sia più semplice agire nella regola che se quando carico un file csv controlla se esiste gia un id come nel codice che ho estrapolato dal file: // If id product AND id product already in base, trying to update if ($product->id AND Product::existsInDatabase(intval($product->id))) { $datas = Db::getInstance()->getRow('SELECT `date_add` FROM `'._DB_PREFIX_.'product` WHERE `id_product` = '.intval($product->id)); $product->date_add = pSQL($datas['date_add']); $res = $product->update(); } Se voglio aggiornare i miei prodotti non da ID, come fà questa regola, ma con il campo "reference" come posso modificare il codice? Link to comment Share on other sites More sharing options...
RuletZ Posted October 2, 2010 Author Share Posted October 2, 2010 Questo è un tentativo ma non funziona: // If id product AND id product already in base, trying to update if ($product->reference AND Product::existsInDatabase(intval($product->reference))) { $datas = Db::getInstance()->getRow('SELECT `date_add` FROM `'._DB_PREFIX_.'product` WHERE `reference` = '.intval($product->reference)); $product->date_add = pSQL($datas['date_add']); $res = $product->update(); } Link to comment Share on other sites More sharing options...
hasniou Posted June 20, 2011 Share Posted June 20, 2011 I have the same problemhave you a solution ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now