[Skip to main content](#vessel-content)

#   Address chosen in user panel to show up in invoice

##

- **[Savickis](/forum/user/26490-savickis "View Savickis's Profile")**
- [![Savickis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26490.jpg)](/forum/user/26490-savickis "View Savickis's Profile") Topic Author
- [ Offline](/forum/user/26490-savickis)

Less More

- Posts: 41
- Thank you received: 9
-
-

13 years 2 months ago [\#121828](#121828) by [Savickis](/forum/user/26490-savickis "View Savickis's Profile")  *[Address chosen in user panel to show up in invoice](/forum/27-checkout/861668-address-chosen-in-user-panel-to-show-up-in-invoice#121828 "Hello!  I've made some modifications so that upon placing order invoice is instantly generated and sent to client's email as PDF. I've also enabled Hikashop user profile, so that clients can edit their email and addresses. But there is slight problem - even if client have added/edited his address through frontend profile, invoice generator use address that client entered during registration phase in Hikashop. So this address can't be edited through Hikashop client profile in frontend?  The question is - is there any way to allow client edit his real credentials via Hikashop frontend, and, if not, then how to at least use his chosen/edited address in inoive form/PDF?  At this moment in invoice.pdf client's address is echoed this way:")* was created by *[Savickis](/forum/user/26490-savickis "View Savickis's Profile")*

Hello!

I've made some modifications so that upon placing order invoice is instantly generated and sent to client's email as PDF. I've also enabled Hikashop user profile, so that clients can edit their email and addresses. But there is slight problem - even if client have added/edited his address through frontend profile, invoice generator use address that client entered during registration phase in Hikashop. So this address can't be edited through Hikashop client profile in frontend?

The question is - is there any way to allow client edit his real credentials via Hikashop frontend, and, if not, then how to at least use his chosen/edited address in inoive form/PDF?

At this moment in invoice.pdf client's address is echoed this way:
Code:

$addresses = array('billing_address'); foreach($addresses as $oneAddress){ if(empty($order-&gt;$oneAddress)) continue; if(!empty($order-&gt;$oneAddress-&gt;address_company)) echo $order-&gt;$oneAddress-&gt;address_company.'&lt;br/&gt;'; echo$order-&gt;$oneAddress-&gt;address_street.', '.$order-&gt;$oneAddress-&gt;address_city.', '.$order-&gt;$oneAddress-&gt;address_post_code.'&lt;br/&gt;&lt;br/&gt;'; if(!empty($order-&gt;$oneAddress-&gt;address_vat)) echo JText::_('VAT_NUMBER').': '.$order-&gt;$oneAddress-&gt;address_vat.'&lt;br/&gt;'; if(!empty($order-&gt;$oneAddress-&gt;address_bank)) echo JText::_('BANK_NAME').': '.$order-&gt;$oneAddress-&gt;address_bank.'&lt;br/&gt;'; if(!empty($order-&gt;$oneAddress-&gt;address_account)) echo JText::_('BANK_ACCOUNT').': '.$order-&gt;$oneAddress-&gt;address_account.'&lt;br/&gt;'; }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTY2OC1hZGRyZXNzLWNob3Nlbi1pbi11c2VyLXBhbmVsLXRvLXNob3ctdXAtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

13 years 2 months ago [\#121850](#121850) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Address chosen in user panel to show up in invoice](/forum/27-checkout/861668-address-chosen-in-user-panel-to-show-up-in-invoice#121850 "Hello!  I've made some modifications so that upon placing order invoice is instantly generated and sent to client's email as PDF. I've also enabled Hikashop user profile, so that clients can edit their email and addresses. But there is slight problem - even if client have added/edited his address through frontend profile, invoice generator use address that client entered during registration phase in Hikashop. So this address can't be edited through Hikashop client profile in frontend?  The question is - is there any way to allow client edit his real credentials via Hikashop frontend, and, if not, then how to at least use his chosen/edited address in inoive form/PDF?  At this moment in invoice.pdf client's address is echoed this way:")*

Hi,

That's normal.
The address that the user enter during the checkout is saved as his address.
At the same time, a copy is selected automatically as the address of the order.
If the user changes his address, his previous orders address is not changed. That's normal and that's how it is on all ecommerce websites.
It's not normal to allow a user to change the address of an order two months later. Suppose that you have to charge taxes for users in your country and not for users outside your country... If the user changes the country of his address in the order, then the taxes of the order need to be updated too, but you can't charge again the user for the taxes update...And you can't refund partly the taxes that you probably already sent to your tax office.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTY2OC1hZGRyZXNzLWNob3Nlbi1pbi11c2VyLXBhbmVsLXRvLXNob3ctdXAtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Savickis](/forum/user/26490-savickis "View Savickis's Profile")**
- [![Savickis's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26490.jpg)](/forum/user/26490-savickis "View Savickis's Profile") Topic Author
- [ Offline](/forum/user/26490-savickis)

Less More

- Posts: 41
- Thank you received: 9
-
-

13 years 2 months ago [\#121892](#121892) by [Savickis](/forum/user/26490-savickis "View Savickis's Profile")  Replied by *[Savickis](/forum/user/26490-savickis "View Savickis's Profile")* on topic *[Address chosen in user panel to show up in invoice](/forum/27-checkout/861668-address-chosen-in-user-panel-to-show-up-in-invoice#121892 "Hello!  I've made some modifications so that upon placing order invoice is instantly generated and sent to client's email as PDF. I've also enabled Hikashop user profile, so that clients can edit their email and addresses. But there is slight problem - even if client have added/edited his address through frontend profile, invoice generator use address that client entered during registration phase in Hikashop. So this address can't be edited through Hikashop client profile in frontend?  The question is - is there any way to allow client edit his real credentials via Hikashop frontend, and, if not, then how to at least use his chosen/edited address in inoive form/PDF?  At this moment in invoice.pdf client's address is echoed this way:")*

Hi, Nicolas! Thanky You very much for Your effort, as usual.

Yes, I understand that under normal conditions (if shop is selling physical goods) client billing/shipping/profile addresses is seperate instances. BUT - in my case client is selling virtual goods, so there is no shipping address, but clients wants that customers can really change their address through frontend profile.

So, let me rephrase my question -

How to edit Hikashop user profile component, so that address (email and shipping address) that have been entered by customer in his forntend profile would show up in invoice, and also be stored as hikashop customer data. So that customer logs in, edit his profile (change email/address) and invoices will be sent to his new email and contain his entered address as billing address.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTY2OC1hZGRyZXNzLWNob3Nlbi1pbi11c2VyLXBhbmVsLXRvLXNob3ctdXAtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14326
-
-

13 years 2 months ago -  13 years 2 months ago [\#121945](#121945) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Address chosen in user panel to show up in invoice](/forum/27-checkout/861668-address-chosen-in-user-panel-to-show-up-in-invoice#121945 "Hello!  I've made some modifications so that upon placing order invoice is instantly generated and sent to client's email as PDF. I've also enabled Hikashop user profile, so that clients can edit their email and addresses. But there is slight problem - even if client have added/edited his address through frontend profile, invoice generator use address that client entered during registration phase in Hikashop. So this address can't be edited through Hikashop client profile in frontend?  The question is - is there any way to allow client edit his real credentials via Hikashop frontend, and, if not, then how to at least use his chosen/edited address in inoive form/PDF?  At this moment in invoice.pdf client's address is echoed this way:")*

The email address is attach only to the user, not to the orders. So if the user changes his email address, it applies for everything.

For the physical address, you will have to change the line: Code:

$this-&gt;loadAddress($order-&gt;order_billing_address_id,$order,'billing','name',$type);

to: Code:

$addressClass = hikashop_get('class.address'); $addresses = $addressClass-&gt;getByUser($order-&gt;order_user_id); $main_address = reset($addresses); $this-&gt;loadAddress($main_address-&gt;address_id,$order,'billing','name',$type);

in the file administrator/components/com_hikashop/classes/order.php

Last edit: 13 years 2 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [Savickis](/forum/user/26490-savickis "View Savickis's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTY2OC1hZGRyZXNzLWNob3Nlbi1pbi11c2VyLXBhbmVsLXRvLXNob3ctdXAtaW4taW52b2ljZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
