zalex899 Posted January 29, 2009 Share Posted January 29, 2009 Ciaoho la versione 1.0quando inserisco delle features si visualizzano in un ordine: es. A B Cmentre quando le seleziono dalla finestra del prodotto (features) si visualizzano al contrario: C B Acome mai ?? mi potreste dire come risolvere questo problema ? o devo inserirle ogni volta al contrario ??? Link to comment Share on other sites More sharing options...
vinoalvino Posted January 29, 2009 Share Posted January 29, 2009 Io ho modificato il file classes/product.php (PARLO DELLA VERSIONE 1.1 di prestashop!!!).Praticamente, come nelle categorie, con la mia modifica puoi scrivere le funzioni così:10.prima funzione20.seconda....99.ultimaQuando le visualizza ordina e toglie il numeretto. Spero di esserti stato utile. Product.zip Link to comment Share on other sites More sharing options...
zalex899 Posted January 30, 2009 Author Share Posted January 30, 2009 non riesco a risolvere questo problemama il fatto è che le mette come vuole lui e non come le inserisco....mi sto stufando di questa roba Link to comment Share on other sites More sharing options...
vinoalvino Posted January 31, 2009 Share Posted January 31, 2009 Hai letto il mio post? Link to comment Share on other sites More sharing options...
zalex899 Posted January 31, 2009 Author Share Posted January 31, 2009 si si ma ho la versione 1.0dici che devo per forza aggiornare tutto ?? ho paura di trovarmi male con la nuova versione Link to comment Share on other sites More sharing options...
vinoalvino Posted January 31, 2009 Share Posted January 31, 2009 Ti consiglio caldamente di aggiornare tutto. Se vuoi ti passo il file Product della versione 1.0, dovrei averlo da qualche parte Link to comment Share on other sites More sharing options...
vinoalvino Posted January 31, 2009 Share Posted January 31, 2009 La modifica riguarda una sola funzione del file classes/Product.php (provo a incollarla qui va bene per la versione 1.0) /* * Select all features for a given language * * @param $id_lang Language id * @return array Array with feature's data * VV001 aggiunto ORDER BY name * VV001 aggiunto leva prefisso */ static public function getFrontFeaturesStatic($id_lang, $id_product) { /* ORIGINAL FUNCTION: return Db::getInstance()->ExecuteS(' SELECT name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.intval($id_lang).') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.intval($id_lang).') WHERE pf.id_product = '.intval($id_product)); */ $result = Db::getInstance()->ExecuteS(' SELECT name, value, pf.id_feature FROM '._DB_PREFIX_.'feature_product pf LEFT JOIN '._DB_PREFIX_.'feature_lang fl ON (fl.id_feature = pf.id_feature AND fl.id_lang = '.intval($id_lang).') LEFT JOIN '._DB_PREFIX_.'feature_value_lang fvl ON (fvl.id_feature_value = pf.id_feature_value AND fvl.id_lang = '.intval($id_lang).') WHERE pf.id_product = '.intval($id_product).' ORDER BY `name`'); /* Modify SQL result */ $resultsArray = array(); foreach ($result AS $row) { $row['name'] = preg_replace('/^[0-9]+\./', '', $row['name']); $resultsArray[] = $row; } return $resultsArray; } Link to comment Share on other sites More sharing options...
zalex899 Posted January 31, 2009 Author Share Posted January 31, 2009 perfetto funzionagrazie infinite 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