Jump to content

LucaPresta

Members
  • Posts

    25
  • Joined

  • Last visited

Profile Information

  • Location
    Italia
  • Activity
    Project Owner

Recent Profile Visitors

512 profile views

LucaPresta's Achievements

Newbie

Newbie (1/14)

3

Reputation

  1. Hi to all, currently I'm on prestashop 1.6.1.6 with a TrailMix theme. I need to randomize the product list of a specific category by showing all of the products that can be shown in each page (so the last paramether is (int)$this->n). Currently the CategoryController in the assignProductList() function has the code: if(((int)$this->category->id_category) == 77 || ((int)$this->category->id) == 77) { $this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay,false, true, true, (int)$this->n); /*if((int)$this->category->id_category == 77) { $toShuffle = $this->cat_products; shuffle($toShuffle); $this->cat_products = $toShuffle; }*/ } else { $this->cat_products = $this->category->getProducts($this->context->language->id, (int)$this->p, (int)$this->n, $this->orderBy, $this->orderWay); } But the products are shown without random criteria. I've also tried to disable/enable blocklayered and clean the cache without having success. I've put the die instruction in the initContent method of the controller and it is the controller that is used (test message is shown) so I'm modifying the correct controller. I've already seen the topics over older prestashop versions and applied the solutions suggested but the problem isn't solved: https://www.prestashop.com/forums/topic/437113-random-product-arrangement-in-product-listing-in-16/?hl=random https://www.prestashop.com/forums/topic/372924-random-product-order-only-for-specific-category/ Someone can help me please? Thank you. Luca
  2. Thank you for your answer shacker! What do you mean with "prestashop option"? Are you talking about manager sql? If it so, the problem is to define the correct query to export the combinations. I see that for product combinations the module you linked is not free... I respect the work of others and know very well how it is important to pay for a good service, but I was wandering, since this is a basic function of import combination if there is a specific solution for this import, I don't need categories export or others, simply the product combinations. Thank you any way! Luca
  3. Hi to all, since May in my country google shopping is refusing products or their combinations that don't have ean13 or UPC valuese. Unfortunately, in a first moment the warehouse keepers didn't insert this values for their products and now there is the need to do a bulk update or export in a csv, then import the csv file. Can someone please tell me which is the correct query to export combinations in a file that can be imported in the import csv section selecting combination? I've tried to import an export of the ps_product_attribute, but many required fields of other tables were missing. Thank you in anticipation. Luca
  4. Ciao a tutti, penso come molti, mi sono dovuto misurare con il problema in oggetto. Visto che google scarta i prodotti e le loro combinazioni privi di GTIN (ean13) ed MPN (UPC), e visto che all'atto del censimento degli articoli in passato questi valori non sono stati inseriti, trattasi di fare un update massivo sulla piattaforma. Da quanto mi è sembrato di capire, la tabella impattata da queste modifiche è la ps_product_attribute dove compaiono queste colonne. Dopo averla esportato ed aggiornato/inserito i dati, quando provo a fare l'importazione del csv, mi dice che ci sono diverse colonne mancanti (attributo con posizione e colore ecc...) che non fanno parte delle colonne della tabella ps_product_attribute (bensì probabilmente di sue correlate). Qualcuno ha idea della query d'esportazione che dovrei usare per poter poi serenamente reimportare i dati via interfaccia del back office? Grazie in anticipo!
  5. Hi, as far as I can remember (currently I have an updated version of the module), i changed the internal urls on both the parent xml (1_index_sitemap.xml) and the two child xml (1_it_0_sitemap.xml, 1_en_0_sitemap.xml). I have a site with english and italian language so, I need to change three files. I manually changed the internal URLs (find and replace with notepad++) that I found from http to https and then i scheduled a cron task with https url. Pay attention: even if curl command can be used with my hosting provider, only wget command works with https. Hope that I helped. Luca
  6. Ciao, da poco aggiornato alla 1.6.0.14 e funziona. Allego l'Order.php da inserire nel percorso: override/classes/order/ Così facciamo prima. @Alexand3r: Assicurati che da back office sotto ordini -> fatture tu abbia impostato anche "Numero fattura" a 0. Naturalmente l'Order.php in allegato è quello della versione 1.6.0.14 (percorso classes/order/) con le modifiche di cui sopra, in modo che funzioni in override con la versione attuale per non perdere nulla. Più di così non so come aiutare... Order.php
  7. DotMedia I'm just a fortunate one but happy to help bellini13 I've tried to clean the cache of chrome but for me it wasn't enough. I'm quiet sure that to solve the problem you have set "no" to the compression of javascript and html in CCC configuration, then clean the cache and after it works, you can reset the optimization of the two options to yes. I've done for all the three environment I've configured. This was the behaviour for me and now I think also for DotMedia. If the problem is solved for all, please mark the topic as solved to help others find the solution. Thank you.
  8. Hi, I've upgraded from 1.6.0.9 to 1.6.0.11. Now, if I I don't deactivate override and module not native there is an issue when I checkout a product (the issue arise in the fast check out from home list, but also from the detailed product page). Print screen in attachment. Don't now which is the module (I can't find any error on server log). Now I've restored the 1.6.0.9. Thank you in anticipation. Luca
  9. Hi, I've had the same issue, but not for Firefox or IE. So with firefox I changed in no the CCC options for compressing javascript and html, then I clear my chrome cache with ctrl + F5 (I was logged with the option "stay connect" or similar flagged). Finally it works for me, please try this and tell me if it's ok. After the problem was solved, I restored the original CCC options, clear one more time the cache and it still works. Luca
  10. Ciao, riepilogo come richiesto, dal canto mio le modifiche immediatamente sotto funzionano su qualsiasi mio ambiente (sviluppo, test, produzione). Con versione 1.6.0.9 (non ho idea se anche la dieci vada corretta, al momento non riesco ad aggiornarla senza problemi di compatibilità col mio tema custom), dopo aver modificato il campo number sulla ps_order_invoice mettendo di nuovo il numero 1, per fargli generare il progressivo della prossima fattura correttamente ho risolto così: ho copiato con ftp client il file /classes/order/Order.php dal server in locale. Ho ridefinito il metodo "getLastInvoiceNumber". Con una query innestata in questo modo: public static function getLastInvoiceNumber() { return Db::getInstance()->getValue(' SELECT `number` FROM `'._DB_PREFIX_.'order_invoice` where id_order_invoice = (SELECT MAX(`id_order_invoice`) FROM `'._DB_PREFIX_.'order_invoice`) '); } poi nel metodo setLastInvoiceNumber sempre di Order.php vanno sostituite le righe con il codice: else $sql .= '(SELECT new_number FROM (SELECT (MAX(`number`) + 1) AS new_number FROM `'._DB_PREFIX_.'order_invoice`) AS result)'; con (parti modificate in grassetto): else $sql .= '(SELECT new_number FROM (SELECT (`number` + 1) AS new_number FROM `'._DB_PREFIX_.'order_invoice` where id_order_invoice = (SELECT MAX(`id_order_invoice`)-1 FROM `'._DB_PREFIX_.'order_invoice`)) AS result)'; Dopo aver salvato le modifiche al file, onde non perderle al prossimo aggiornamento, invece di sovrascrivere il file locale sul server al suo stesso percorso, lo posiziono nel percorso di override: override/classes/order Il gioco è fatto, mi raccomando di ripartire da uno modificando il number della prima fattura di ciascun anno da db e lasciare a 0 il value di PS_START_INVOICE_NUMBER in PS_CONFIGURATION. Direi che è tutto, prego di marcare questo topic come [RISOLTO] a chi lo ha aperto, in modo tale che altri possano farvi riferimento come soluzione. Mi riservo di migliorare il prossimo anno la soluzione, in modo che non si debba andare ogni volta a db a modificare il number della prima fattura dell'anno, per il momento visto che funziona e che non mi sto facendo pagare, arranges :-) ! Luca
  11. Ciao, ho risolto in lettura, quindi se vai in back office su ordini -> fatture vedi il prossimo numero corretto MA, mancava la controparte per la scrittura. Nel metodo setLastInvoiceNumber di Order.php devi sostituire: else $sql .= '(SELECT new_number FROM (SELECT (MAX(`number`) + 1) AS new_number FROM `'._DB_PREFIX_.'order_invoice`) AS result)'; con (parti modificate in grassetto): else $sql .= '(SELECT new_number FROM (SELECT (`number` + 1) AS new_number FROM `'._DB_PREFIX_.'order_invoice` where id_order_invoice = (SELECT MAX(`id_order_invoice`)-1 FROM `'._DB_PREFIX_.'order_invoice`)) AS result)'; Altrimenti scrive a db il numero sbagliato e si comporta ancora in modo anomalo. Il principio è lo stesso della modifica che ho introdotto per il metodo getter che ti ho suggerito nella mia prima risposta. Anch'io sto testando sulle mie stesse fatture sulle vendite. Per il momento ho completato il test nella mia copia in locale e funziona tutto correttamente ;-)
  12. Ciao, io con la versione 1.6.0.9, dopo aver modificato il campo number sulla ps_order_invoice mettendo di nuovo il numero 1, per fargli generare il progressivo della prossima fattura correttamente ho risolto così: ho copiato con ftp client il file /classes/order/Order.php dal server in locale. Ho ridefinito il metodo "getLastInvoiceNumber". Con una query innestata in questo modo: public static function getLastInvoiceNumber() { return Db::getInstance()->getValue(' SELECT `number` FROM `'._DB_PREFIX_.'order_invoice` where id_order_invoice = (SELECT MAX(`id_order_invoice`) FROM `'._DB_PREFIX_.'order_invoice`) '); } In sostanza recupero da database il record con il massimo id_order_invoice ( che è chiave primaria, ovvero il record dell'ultima fattura) e di quel record il metodo ne restituisce il number a prescindere da quale esso sia. Recupero in parole povere il valore dell'ultima fattura generata (il cui progressivo, ovvero id_order_invoice sarebbe 337 ma col nuovo anno riparte con number 1), in modo tale che la prossima fattura sarà tale valore + 1 cioè 2. Dopo aver salvato le modifiche al file, onde non perdere al prossimo aggiornamento, invece di sovrascrivere il file locale sul server al suo stesso percorso, lo posiziono nel percorso di override: override/classes/order Spero di essere stato utile.
  13. Ciao, anch'io avevo questo problema oggi, leggendo in questo topic: http://www.prestashop.com/forums/topic/199537-come-inserire-codice-fiscale-in-fattura/ Il problema è risolvibile inserendo la scritta dni nel layout indirizzo delle nazioni attive sotto localizzazione -> nazione. L'ho testato e funziona anche nella 1.6.9. Buon e-commerce! Luca
  14. Prego Paolo, lieto che tu abbia risolto in ogni caso. Puoi editare questo topic mettendo la scritta [Risolto] accanto al titolo, così chi dovesse avere il tuo problema, magari è passato da un temporale e sa che deve fare una pulizia della cache dal modulo cleaner .
×
×
  • Create New...