Abh Posted January 30, 2010 Share Posted January 30, 2010 Salut. In momentul de fata, fie ca dau sa printeze toate facturile sau doar pe client individual, aceastea ies separat, fiecare pe o pagina. Ce as vrea sa stiu e cum/daca pot sa scot un centralizator (o lista )cu clientii care au facut comenzi in ziua precedenta.Deocamdata tocmai citesc alea 31 de pagini pe care cuvantul 'invoice' le-a generat la cautare, dar poate ma salveaza cineva intre timp Link to comment Share on other sites More sharing options...
Abh Posted January 30, 2010 Author Share Posted January 30, 2010 Ahm, ma poate ajuta cineva sa fac functia?Asta e functia ce genereaza pdf-ul pentru facturi, in admin/tabs/AdminInvoices.php: public function displayForm() { global $currentIndex; $output = ' '.$this->l('Printeaza facturi').' <form action="'.$currentIndex.'&submitPrint=1&token;='.$this->token.'" method="post"> '.$this->l('From:').' <input type="text" size="4" maxlength="10" name="date_from" value="'.(date('Y-m-d')).'" style="width: 120px;" /> * '.$this->l('Format: 2007-12-31 (inclusive)').' '.$this->l('To:').' <input type="text" size="4" maxlength="10" name="date_to" value="'.(date('Y-m-d')).'" style="width: 120px;" /> * '.$this->l('Format: 2008-12-31 (inclusive)').' <input type="submit" value="'.$this->l('Generate PDF file').'" name="submitPrint" class="button" /> * '.$this->l('Required fields').' </form> '; echo $output; } Si eu vreau in principiu sa fac una care sa faca in mare acelasi lucru, dar sa nu sara pagina la fiecare comanda cand printeaza.Intr-o incercare disperata am dublat de la $output = ' in jos si acum am pe pagina de invoice doua blocuri care fac acelasi lucru. Se poate modifica al doilea incat sa faca ce vreau eu? Link to comment Share on other sites More sharing options...
The Ge Posted January 30, 2010 Share Posted January 30, 2010 Generarea PDF-ului o face clasa PDF din /classes/PDF.php, functia multipleInvoices./admin/tabs/AdminInvoices.php nu contine decat apelul catre ea.Problema e ca multipleInvoices apeleaza la randul ei functia invoice din aceeasi clasa. Asa ca trebuie sa pui un if in invoice ca sa nu strici restul PDFurilor.E destul de complicat, spor la treaba. Link to comment Share on other sites More sharing options...
Abh Posted January 30, 2010 Author Share Posted January 30, 2010 Da, m-am exprimat gresit, intr-adevar in PDF.php se genereaza pagina, dar problema mea e ca nu stiu cum anume o apeleaza. Prin urmare nu stiu nici s-o modific/rescriu. Poate m-as fi descurcat mai usor daca era php simplu, dar ma pierd in smarty. N-am idee nici macar unde declara astia variabilele.Bine, voi incerca sa fac niste minuni, o sa mai postez aici ca sa radeti si voi. Link to comment Share on other sites More sharing options...
Abh Posted January 30, 2010 Author Share Posted January 30, 2010 Solutia Nr.02:http://www.prestashop.com/forums/viewthread/8424/modules___development/module_to_export_ordersProblema cu Solutia Nr.02: nu am nevoie de toata lista, vreau sa pot alege ziua pe care sa-mi exporte comenzile. Dupa cum arata, cred ca va fi mult mai usor de modificat decat pdf.php. O sa-l contactez si pe developer. Link to comment Share on other sites More sharing options...
corint1 Posted September 24, 2012 Share Posted September 24, 2012 cum ai rezolvat-o daca ai rezolvat-o ...merci 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