3 hours ago, D. Tengler said:1.
./admin dir/themes/default/template/controllers/orders/_print_pdf_icon.tpl
{* Generate HTML code for printing Delivery Icon with link *}
* find submitAction generateDeliverySlipPDF
* change link or modify function
2.
./controllers/admin/AdminPdfController.php
* find function processGenerateDeliverySlipPDF()
create new function or change function
If you have no experience with Prestashop programming, it will be a problem for you.
I've decided to do a workaround by putting the order_id in the DB and then selecting that value using another php script but when i click the button i get a white page and the value isn't updated in the DB.
This is the edit i did to processGenerateDeliverySlipPDF
public function processGenerateDeliverySlipPDF() { if (Tools::isSubmit('id_order')) { $this->generateDeliverySlipPDFByIdOrder((int) Tools::getValue('id_order')); } elseif (Tools::isSubmit('id_order_invoice')) { $this->generateDeliverySlipPDFByIdOrderInvoice((int) Tools::getValue('id_order_invoice')); } elseif (Tools::isSubmit('id_delivery')) { $order = Order::getByDelivery((int) Tools::getValue('id_delivery')); $this->generateDeliverySlipPDFByIdOrder((int) $order->id); } elseif (Tools::isSubmit('id_comanda')){ $query = "UPDATE `"._DB_PREFIX_."ps_alinut_curier` SET order_id='$id_comanda' WHERE id=1"; Db::getInstance()->Execute($query); } else { die($this->trans('The order ID -- or the invoice order ID -- is missing.', array(), 'Admin.Orderscustomers.N> } }