Andrea Posted December 2, 2018 Share Posted December 2, 2018 Già ho tentato sul forum normale di risolvere ma nessuno sa niente. In prestashop 1.7, se si tenta di aggiungere nuove provincie, non vengono poi inserite in ordine alfabetico nella tendina di scelta al momento di creare un indirizzo da parte dell'utente. Vengono inserite in fondo alla lista. La query che si occupa di estrapolare le provincie in ordine alfabetico ha già in sè il comando corretto, tuttavia rimangono in fondo, con il risultato che l'utente non le vede. Spero che almeno qui qualcuno ne sappia qualcosa. Link to comment Share on other sites More sharing options...
46racer46 Posted February 7, 2020 Share Posted February 7, 2020 Ciao Andrea. Tu hai risolto? Link to comment Share on other sites More sharing options...
Andrea Posted February 8, 2020 Author Share Posted February 8, 2020 Macchè, più di un anno passato, mi ero anche scordato. A memoria le ho dovute lasciare così, ci si perdeva troppo tempo...a quanto pare nessuno lo sa. Comunque ho deciso di usarlo sempre meno prestashop, è troppo complesso e delicato, una struttura troppo "pericolante" a mio avviso. Link to comment Share on other sites More sharing options...
Fabry Posted February 9, 2020 Share Posted February 9, 2020 Ciao...sta "roba" é giá stata risolta da tempo e vi avevano anche risposto proprio quá:-) é semplice, basta modificare un poco la classe State.php in una funzione ed aggiungere un poco di codice...fatto. public static function getStatesByIdCountry($idCountry, $active = false) { if (empty($idCountry)) { die(Tools::displayError()); } return Db::getInstance()->executeS(' SELECT * FROM `'._DB_PREFIX_.'state` s WHERE s.`id_country` = '.(int) $idCountry . ($active ? ' AND s.active = 1' : "").' ORDER BY name ASC'); } Link to comment Share on other sites More sharing options...
46racer46 Posted February 9, 2020 Share Posted February 9, 2020 Già visualizzato e già provato. Risultato: errore 500 in front e all'apertura dei dettagli ordine in back... Link to comment Share on other sites More sharing options...
Fabry Posted February 9, 2020 Share Posted February 9, 2020 No funziona su tutte le versioni di ps 1.7.x.. c'é l'ho operativo su 1.6.1.23....su 1.7.4....1.7.5 e su tutte le 1.7.6.x, ti confermo che non ho nessun errore 500 vedi allegato....aggiunto nuova provincia Sud Sardegna e come vedi é in ordine alfabetico 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