hakordas Posted October 26, 2016 Share Posted October 26, 2016 Hello, I want to transform the delivery slip into a cmr document. I was not able to find how can i insert into a field just the customer name and delivery address. Also i want a field to contain the invoice number and the payment method. Anyone can give some guidance? Thanks in advance. Link to comment Share on other sites More sharing options...
rocky Posted October 27, 2016 Share Posted October 27, 2016 You can use {$order_invoice->number} for the invoice number and {$order->payment} for the payment method. Link to comment Share on other sites More sharing options...
hakordas Posted October 27, 2016 Author Share Posted October 27, 2016 Thanks a lot rocky Any idea how i can insert customer address and first and last name? Link to comment Share on other sites More sharing options...
rocky Posted October 28, 2016 Share Posted October 28, 2016 Use {$invoice_address} and {$delivery_address} for the customer's invoice and delivery address. I don't see a variable for the customer first and last name. Hopefully, it's included in the address. Link to comment Share on other sites More sharing options...
tuk66 Posted October 28, 2016 Share Posted October 28, 2016 {$customer->firstname} and {$customer->lastname} variables are available in invoices only. See /classes/pdf/HTMLTemplateInvoice.php, getContent(). Link to comment Share on other sites More sharing options...
hakordas Posted October 28, 2016 Author Share Posted October 28, 2016 Thanks you all for the replies. Both {$invoice_address} and {$delivery_address} have a lot of data. I just want firstname, lastname and address. I added $customer = new Customer((int)$this->order->id_customer); to my HTMLTemplateDeliverySlip.php but does not give me access to customer class Link to comment Share on other sites More sharing options...
hakordas Posted October 28, 2016 Author Share Posted October 28, 2016 Thanks a lot guys I found the solution. Just needed to add the fileds to the array. Your help was great. 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