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

#   Display custom address fields on billing address

##

- **[earthship](/forum/user/1027-earthship "View earthship's Profile")**
- [![earthship's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/1027-earthship "View earthship's Profile")
- [ Offline](/forum/user/1027-earthship)

Less More

- Posts: 2
- Thank you received: 0
-
-

15 years 8 months ago [\#11237](#11237) by [earthship](/forum/user/1027-earthship "View earthship's Profile")  Replied by *[earthship](/forum/user/1027-earthship "View earthship's Profile")* on topic *[Re: Display custom address fields on billing address](/forum/4-how-to/7412-display-custom-address-fields-on-billing-address?start=20#11237 "Hi,  I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.  I need to show the custom fields completed with their relative labels.  I'm thinking that I need to edit the Display &gt; Views &gt; address&#95;template but I'm not sure how to get the labels for the custom fields to show as well.  Any help appreciated.  cheers!")*

excellent. thanks for the help! ![;-)](/media/kunena/emoticons/24.png ";-)")

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

- **[cubefree](/forum/user/2681-cubefree "View cubefree's Profile")**
- [![cubefree's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2681-cubefree "View cubefree's Profile")
- [ Offline](/forum/user/2681-cubefree)

Less More

- Posts: 41
- Thank you received: 0
-
-

15 years 3 months ago -  15 years 3 months ago [\#22223](#22223) by [cubefree](/forum/user/2681-cubefree "View cubefree's Profile")  Replied by *[cubefree](/forum/user/2681-cubefree "View cubefree's Profile")* on topic *[Re: Display custom address fields on billing address](/forum/4-how-to/7412-display-custom-address-fields-on-billing-address?start=20#22223 "Hi,  I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.  I need to show the custom fields completed with their relative labels.  I'm thinking that I need to edit the Display &gt; Views &gt; address&#95;template but I'm not sure how to get the labels for the custom fields to show as well.  Any help appreciated.  cheers!")*

Nicolas,

RE: #10395 msg above

I tried adding my custom field which is within the Address area:

&lt;?php
echo JText::sprintf('Delivery Method','{deliverymethod}');
?&gt;

But the view does not seem to recognize my custom field when appended to View: address_template

What am I missing here?

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc0MTItZGlzcGxheS1jdXN0b20tYWRkcmVzcy1maWVsZHMtb24tYmlsbGluZy1hZGRyZXNzP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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: 86583
- Thank you received: 14324
-
-

15 years 3 months ago [\#22224](#22224) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Display custom address fields on billing address](/forum/4-how-to/7412-display-custom-address-fields-on-billing-address?start=20#22224 "Hi,  I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.  I need to show the custom fields completed with their relative labels.  I'm thinking that I need to edit the Display &gt; Views &gt; address&#95;template but I'm not sure how to get the labels for the custom fields to show as well.  Any help appreciated.  cheers!")*

The code
echo JText::sprintf('Delivery Method','{deliverymethod}');
will just display "Delivery Method".

I see that you're trying to imitate the code for the phone number:
echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');

However, JText::sprintf is a function to convert translation keys based on translation files.
In your translation file you will find the code:
TELEPHONE_IN_ADDRESS="Telephone: %s"

So basically what that function does is that it replaces TELEPHONE_IN_ADDRESS by Telephone: %s and then %s by {address_telephone} so you end up with: Telephone: {address_telephone}

The goal is to handle translations.

If you don't need translations,
You could just write:
Delivery Method : {deliverymethod}

instead of:
&lt;?php
echo JText::sprintf('Delivery Method','{deliverymethod}');
?&gt;
and that will work.

If you want to handle translations, you should use:
&lt;?php
echo JText::sprintf('DELIVERY_METHOD','{deliverymethod}');
?&gt;

and then, in your translation file override, add the line:
DELIVERY_METHOD="Delivery method : %s"

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

- **[cubefree](/forum/user/2681-cubefree "View cubefree's Profile")**
- [![cubefree's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2681-cubefree "View cubefree's Profile")
- [ Offline](/forum/user/2681-cubefree)

Less More

- Posts: 41
- Thank you received: 0
-
-

15 years 3 months ago [\#22245](#22245) by [cubefree](/forum/user/2681-cubefree "View cubefree's Profile")  Replied by *[cubefree](/forum/user/2681-cubefree "View cubefree's Profile")* on topic *[Re: Display custom address fields on billing address](/forum/4-how-to/7412-display-custom-address-fields-on-billing-address?start=20#22245 "Hi,  I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.  I need to show the custom fields completed with their relative labels.  I'm thinking that I need to edit the Display &gt; Views &gt; address&#95;template but I'm not sure how to get the labels for the custom fields to show as well.  Any help appreciated.  cheers!")*

Thank you. Sorry I thought I had tried

> Delivery Method : {deliverymethod}

Yes, it works wonderfully...

Can I also do this with Hika Essential in the email templates?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc0MTItZGlzcGxheS1jdXN0b20tYWRkcmVzcy1maWVsZHMtb24tYmlsbGluZy1hZGRyZXNzP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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: 86583
- Thank you received: 14324
-
-

15 years 3 months ago [\#22246](#22246) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Display custom address fields on billing address](/forum/4-how-to/7412-display-custom-address-fields-on-billing-address?start=20#22246 "Hi,  I have created several custom address fields to be completed during registration. How can I allow the user to edit those fields when going through the checkout? At the moment all that displays are the core address fields unless the customer clicks the edit icon.  I need to show the custom fields completed with their relative labels.  I'm thinking that I need to edit the Display &gt; Views &gt; address&#95;template but I'm not sure how to get the labels for the custom fields to show as well.  Any help appreciated.  cheers!")*

Sure. The address_template view file is also used for addresses in emails.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc0MTItZGlzcGxheS1jdXN0b20tYWRkcmVzcy1maWVsZHMtb24tYmlsbGluZy1hZGRyZXNzP3N0YXJ0PTIwJnRtcGw9bWFya2Rvd24=) 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.080 seconds

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