kalua Posted February 21, 2015 Share Posted February 21, 2015 Hey all Does anybody know how can i change the fields of the $invoice_adress? The problem comes from the fields "phone" and "mobil" that are integrated in the "$invoice_adress" that are output in the PDF invoices. So far so good, but I don't want to have the telephonenumber printed on the PDF-invoices. I know i can change that in locations/countries ... but if i take away the two fields phone and mobil, i can't save the clients adresses any more. The reason is that i have to insert a telephone to save, but the input fields are not showing up to insert the telephone data? The solutions I'am looking for is the place where the single fields from the adress wil be assigned to "$invoice_adress". Any idea? Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2015 Share Posted February 23, 2015 You can change /classes/pdf/HTMLTemplate.php::getShopAddress method for that. Link to comment Share on other sites More sharing options...
kalua Posted February 23, 2015 Author Share Posted February 23, 2015 Thanks Tuk for the hint, but the problem relates to the telephone number from the client that I have to delete, not from the shop. I found another one, the HTMLTemplateInvoice.php I think that could be the right, but I can't find any code about the telephone number over there... Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2015 Share Posted February 23, 2015 Sure, sorry. I missed. HTMLTemplateInvoice::getContent --> .... AddressFormat::generateAddress .... Link to comment Share on other sites More sharing options...
kalua Posted February 23, 2015 Author Share Posted February 23, 2015 No problem Tuk ;-) I found that part and also the code "::generateAddress" but how can i change that? I thought that there will be the data for the telephone that i just have to delete, but it seems that the data will be taken from somewhere else? Link to comment Share on other sites More sharing options...
tuk66 Posted February 23, 2015 Share Posted February 23, 2015 I would create my AddressFormat::myGenerateAddress method and filter out all unwanted address fields (phone, phone_mobile). Link to comment Share on other sites More sharing options...
kalua Posted February 23, 2015 Author Share Posted February 23, 2015 Thanks Tuk Filter out is a good idea, but i don't know where are the data located that i have to filter out! You know what I mean? I tried via php to unset the specific array_key but did not work Link to comment Share on other sites More sharing options...
kalua Posted February 24, 2015 Author Share Posted February 24, 2015 After hours of trying to solve the problem, i still stay at the same place. I think it is not so easy to filter out the data i need from $invoice_adress and generate it new. The next idea to get a solution is not to use the array $invoice_address in the invoice.tpl ... instead use the single data step by step like this one ... {$customer->id_gender} {$customer->lastname} {$customer->firstname} ....... so far so good, but this put out the last and firstname from the customer. But I need the last and firstname of the address table in the invoice if i change to code like this ... {$address->lastname} I did not get any output ... Hm, frustrating 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