garciasanchezdani Posted November 23, 2015 Share Posted November 23, 2015 I have a prestashop website, which has two shops ( multi-store): shop 'A', and shop 'B'. When I buy only products from shop A, invoice is generated properly, with data of shop A; and vice versa. But my problem comes when I buy one product from shop A, and other product from shop B. Then, the invoice is generated with only data of one shop ( shop A, which is the default ). I'd need to display both shops in the invoice ( in the same pdf ). My template is invoice, so the tpl is invoice.tpl ( and header.tpl and footer.tpl ), and I see that the file classes/pdf/HTMLTemplateInvoice.php do the logic: public function __construct(OrderInvoice $order_invoice, $smarty) { $this->order_invoice = $order_invoice; $this->order = new Order((int)$this->order_invoice->id_order); $this->smarty = $smarty; // header informations $this->date = Tools::displayDate($order_invoice->date_add); $id_lang = Context::getContext()->language->id; $prefix = Configuration::get('PS_INVOICE_PREFIX', $id_lang, null, (int)$this->order->id_shop); $this->title = sprintf(HTMLTemplateInvoice::l('Invoice #%1$s%2$06d'), $prefix, $order_invoice->number); // footer informations $this->shop = new Shop((int)$this->order->id_shop); } Could you help me, please? 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