- Posts: 20
- Thank you received: 0
address2 and custom field (address3) not on invoic
- ronsnijder
-
Topic Author
- Offline
Less
More
13 years 11 months ago #69014
by ronsnijder
address2 and custom field (address3) not on invoic was created by ronsnijder
Hi,
I am new to Hikashop and I am trying to change some things for my customer. They want to have the address fields seperated in:
address1 - streetname
address2 - housenumber
address3 - housenumber suffix
I have added address3 as a custom field, which is displayed correctly in the order overview in Hikashop.
I am using PDF invoice, and there both address2 and address3 are not shown
I am not familiar with PHP and I am new to Hikashop. Could somebody help me solving this issue?
I am using Joomla 2.5.7 and Hikashop 1.6.0
Thanxx a lot
I am new to Hikashop and I am trying to change some things for my customer. They want to have the address fields seperated in:
address1 - streetname
address2 - housenumber
address3 - housenumber suffix
I have added address3 as a custom field, which is displayed correctly in the order overview in Hikashop.
I am using PDF invoice, and there both address2 and address3 are not shown
I am not familiar with PHP and I am new to Hikashop. Could somebody help me solving this issue?
I am using Joomla 2.5.7 and Hikashop 1.6.0
Thanxx a lot
Please Log in or Create an account to join the conversation.
13 years 11 months ago #69021
by nicolas
Replied by nicolas on topic Re: address2 and custom field (address3) not on invoic
Hi,
You will have to edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php and change the code displaying the address.
Here is the code you want to change:
You will have to edit the file plugins/hikashop/attachinvoice/attachinvoice/invoice.php and change the code displaying the address.
Here is the code you want to change:
Code:
<?php
if(!empty($order->$oneAddress->address_company)) echo $order->$oneAddress->address_company.'<br/>';
echo $order->$oneAddress->address_title.' '.$order->$oneAddress->address_firstname.' '.$order->$oneAddress->address_lastname.'<br/>';
echo $order->$oneAddress->address_street.'<br/>';
echo $order->$oneAddress->address_post_code.' '.$order->$oneAddress->address_city.' '.$order->$oneAddress->address_state.'<br/>';
echo $order->$oneAddress->address_country.'<br/>';
if(!empty($order->$oneAddress->address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS',$order->$oneAddress->address_telephone).'<br/>';
if(!empty($order->$oneAddress->address_vat)) echo JText::_('VAT_NUMBER').' : '.$order->$oneAddress->address_vat.'<br/>';
?>
Please Log in or Create an account to join the conversation.
- ronsnijder
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
13 years 11 months ago #69043
by ronsnijder
Replied by ronsnijder on topic Re: address2 and custom field (address3) not on invoic
Super! Thanxx for the help
Please Log in or Create an account to join the conversation.
- ronsnijder
-
Topic Author
- Offline
Less
More
- Posts: 20
- Thank you received: 0
13 years 11 months ago #69784
by ronsnijder
Replied by ronsnijder on topic Re: address2 and custom field (address3) not on invoic
Hi Nicolas,
With PDF invoice it is working perfectly. But the standard Hikashop Email are missing those extra fields. As I told you before, I don't know PHP that well. Would you please tell me which files I have to change in order to add those extra fields to the standard Hikashop conformation mails?
Thanxx a lot for the help
Ron
With PDF invoice it is working perfectly. But the standard Hikashop Email are missing those extra fields. As I told you before, I don't know PHP that well. Would you please tell me which files I have to change in order to add those extra fields to the standard Hikashop conformation mails?
Thanxx a lot for the help
Ron
Please Log in or Create an account to join the conversation.
13 years 11 months ago #69901
by nicolas
Replied by nicolas on topic Re: address2 and custom field (address3) not on invoic
Hi,
For the emails, you need to edit the files address_template via the menu Display->Views. They are even easier to edit than the PDF invoice so it should be easy for you. Just make sure that you edit all of them.
For the emails, you need to edit the files address_template via the menu Display->Views. They are even easier to edit than the PDF invoice so it should be easy for you. Just make sure that you edit all of them.
The following user(s) said Thank You: ronsnijder
Please Log in or Create an account to join the conversation.
13 years 2 months ago #113981
by gasoline
I'll keep on trying!
Replied by gasoline on topic Re: address2 and custom field (address3) not on invoic
I changed invoice.php, but its not working. Whats wrong?
This line I changed:
Code:
<?php
if(!empty($order->$oneAddress->address_company)) echo $order->$oneAddress->address_company.'<br/>';
echo $order->$oneAddress->address_title.' '.$order->$oneAddress->address_firstname.' '.$order->$oneAddress->address_lastname.'<br/>';
echo $order->$oneAddress->address_street.' '.$order->$oneAddress->address_nr.' '.$order->$oneAddress->address_ext.'<br/>';
echo $order->$oneAddress->address_post_code.' '.$order->$oneAddress->address_city.' '.$order->$oneAddress->address_state.'<br/>';
echo $order->$oneAddress->address_country.'<br/>';
if(!empty($order->$oneAddress->address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS',$order->$oneAddress->address_telephone).'<br/>';
if(!empty($order->$oneAddress->address_vat)) echo JText::_('VAT_NUMBER').' : '.$order->$oneAddress->address_vat.'<br/>';
?>
This line I changed:
Code:
echo $order->$oneAddress->address_street.' '.$order->$oneAddress->address_nr.' '.$order->$oneAddress->address_ext.'<br/>';
I'll keep on trying!
Please Log in or Create an account to join the conversation.
13 years 2 months ago #114056
by Xavier
Replied by Xavier on topic Re: address2 and custom field (address3) not on invoic
Hi,
This should work, are you sure that your custom fields have this column name in the menu Display > Custom fields ?
The code seems to be ok.
This should work, are you sure that your custom fields have this column name in the menu Display > Custom fields ?
The code seems to be ok.
Please Log in or Create an account to join the conversation.
13 years 2 months ago #114107
by gasoline
I'll keep on trying!
Replied by gasoline on topic Re: address2 and custom field (address3) not on invoic
Stupid me, I made typo :blush:
Now its working, Thanks.
Now its working, Thanks.
I'll keep on trying!
Please Log in or Create an account to join the conversation.
Time to create page: 0.306 seconds