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

#   Select type of receipt on checkout

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

5 years 6 months ago [\#332121](#332121) by [attenzo](/forum/user/36646-attenzo "View attenzo's Profile")  *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332121 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")* was created by *[attenzo](/forum/user/36646-attenzo "View attenzo's Profile")*

-- HikaShop version -- : 4.4.0
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.3

Hello,

I would like help with the following:

1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants.
It can be "plain receipt" or "Invoice". If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.

So far, I used a custom field in the table "order" for implementing the "type of receipt" option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice).
However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt.
So I figured that the solution would be to use a custom field in the table "address" for the "receipt type" option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.

This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...

The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?

I can't find a similar post, haven't anyone had this issue before? Am I missing something?

2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the "Address format" box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?

Thank you

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

5 years 6 months ago [\#332130](#332130) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332130 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Hi,

1. What you can try is to add the line: Code:

&lt;?php $this-&gt;options['edit_address'] = (!empty($this-&gt;cart_addresses['data']) ? key($this-&gt;cart_addresses['data']) : true); ?&gt;

at the beginning of the show_block_address view file via the menu Display&gt;Views.
That will force the address block to always be in edit mode with either the first address of the customer in edit mode or a new address if the customer doesn't have any addresses. Hopefully, it should still allow the user to proceed to the next step.

To do the display/hidding of the fields based on a different type of custom field poses two problems:
- You need to add custom javascript to the page to hide/display the address fields based on the order field, and you still have the issue of what happens when an address is already there and the user doesn't edit it.
- If, among the fields you hide, you have required fields, that will still be enforced by the server side. So that would require extra development.

2. You need to add PHP code to it. Same as is done by default for the telephone field: Code:

&lt;?php if(!empty($this-&gt;address-&gt;address_telephone)) echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?&gt;

That code will display the text of the TELEPHONE_IN_ADDRESS and the tag address_telephone only if there is something in the address_telephone field.
So if you want to check the type of the address, you could change the condition to be $this-&gt;address-&gt;address_type == 'shipping' instead of !empty($this-&gt;address-&gt;address_telephone)

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

5 years 6 months ago [\#332263](#332263) by [attenzo](/forum/user/36646-attenzo "View attenzo's Profile")  Replied by *[attenzo](/forum/user/36646-attenzo "View attenzo's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332263 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

1. Thank you but this doesn't work. Also, we don't need to have it always open, just when the user first enters the checkout step. As if he clicked the pencil icon.

2. Thank you, I can use that.

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

5 years 6 months ago [\#332266](#332266) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332266 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Hi,

Then you need to adapt the condition.
For example: Code:

&lt;?php if(!isset($_SESSION['first_time_for_current_session'])) $_SESSION['first_time_for_current_session'] = true; if( $_SESSION['first_time_for_current_session'] &amp;&amp; !empty($this-&gt;cart_addresses['data']) ){ $this-&gt;options['edit_address'] = key($this-&gt;cart_addresses['data']); $_SESSION['first_time_for_current_session'] = false; }?&gt;

This will do it only the first time for the current user session, like you said. However, if the user refreshes the page, or if the address view is refreshed in ajax for some reason, then it won't be the first time anymore.... So what is "first" is hard to decide programatically.
That's why I proposed to always have it in edit mode.
The system is not made to work like that so I guess it would require proper development of a custom solution with a few hundred lines of code, outside of the scope of this forum.

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 6 months ago [\#332510](#332510) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332510 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Thank you, I put this piece of code at the beginning of the file and there was no change. Never mind I will not implement this.

One last question about point 2:
While the custom Address format is shown in checkout and order e-mail, it is not shown in the address on the User profile in the area of "Addresses". Am I missing something?

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

5 years 6 months ago [\#332518](#332518) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332518 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Hi,

That would be strange. It's the same view file address / address_template.php which is used for all the frontend where an address needs to be displayed.
Could you provide some screenshots to illustrate the issue ?

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 6 months ago -  5 years 6 months ago [\#332529](#332529) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332529 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

I think that the reason of this is the condition you suggested about checking if the address is billing or shipping.

Could you please check this and tell me if I am doing it wrong? For example with the following code the address in the checkout works as expected but in the user profile -&gt; addresses it doesnt show the telephone on the billing address

{address_firstname} {address_lastname}
{address_street}
{address_post_code} {address_city} {address_state}
{address_country}
&lt;?php if($this-&gt;address-&gt;address_type == 'billing') echo JText::sprintf('TELEPHONE_IN_ADDRESS','{address_telephone}');?&gt;

Please advise

Edit. Also I noticed that when I try to edit the shipping address in the user profile, the mini address is not updated.

Last edit: 5 years 6 months ago by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile").

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

5 years 6 months ago -  5 years 6 months ago [\#332533](#332533) by [attenzo](/forum/user/36646-attenzo "View attenzo's Profile")  Replied by *[attenzo](/forum/user/36646-attenzo "View attenzo's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332533 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

following

Last edit: 5 years 6 months ago by [attenzo](/forum/user/36646-attenzo "View attenzo's Profile").

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

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

Less More

- Posts: 18
- Thank you received: 0
-
-

5 years 6 months ago [\#332536](#332536) by [kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")  Replied by *[kathrin20](/forum/user/61360-kathrin20 "View kathrin20's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332536 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Nicolas,
I bought the latest version and updated it. It now works as it should.

What I noted about the mini address remains: the mini address is not updated until someone refreshed the page. But I guess this does not have to do with the address format.

Thank you

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

5 years 6 months ago [\#332542](#332542) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Select type of receipt on checkout](/forum/27-checkout/902475-select-type-of-receipt-on-checkout#332542 "-- HikaShop version -- : 4.4.0 -- Joomla version -- : 3.9.23 -- PHP version -- : 7.3  Hello,  I would like help with the following:  1) I have a live e-shop where, like many e-shops in my country needs an option in the checkout for what type of receipt the customer wants. It can be &quot;plain receipt&quot; or &quot;Invoice&quot;. If he choses Invoice, some extra fields are needed for the billing (VAT, Company name, tax office, profession). This does not have to do with retail or wholesale. A retail customer may still wish to have an invoice issued instead of a plain receipt. The price will be the same, its just the type or receipt he wants to receive.  So far, I used a custom field in the table &quot;order&quot; for implementing the &quot;type of receipt&quot; option, because this is order specific (a client may sometimes want a plain receipt and another time he may want an invoice). However, that way, the extra fields in the address are always available. What I really need is those fields to be invisible if he chooses plain receipt. So I figured that the solution would be to use a custom field in the table &quot;address&quot; for the &quot;receipt type&quot; option (instead of table order ) so I can have the Vat, company, tax office and profession dependent on that field. So they will appear in the form only if he chooses invoice.  This is ok with guests. However, for registered users, the address is not in edit mode during checkout. It should be in edit mode so that the registered clients are forced to choose a receipt type every time they buy something. I saw another post in the forum on that, with instructions on how to display the address in edit mode, but it did not work, maybe because it was 6 years ago. It was about editing the file checkout - address select...  The other solution would be to use the field that I have now for the receipt type, in the order column, but is it possible to have fields from the address table depend on it? I yes, how?  I can't find a similar post, haven't anyone had this issue before? Am I missing something?  2) Also I would like to know how i can distinguish between the Address format of billing address and shipping address. The fields about vat etc do not belong in the shipping address. Ok I have chosen inside the fields options to only be on billing address BUT when I want to fix the format in the &quot;Address format&quot; box I want to put some labels for those fields. And the labels appear in both the billing and the shipping address even though in the shipping address the values of the fields are not there. How can I fix that?  Thank you")*

Hi,

Ah yes, that was a bug we fixed recently for the billing / shipping address display.
Regarding the update of the mini address, that's normal. The goal of the address selector is just to select the default address. If the wording in it is not updated after you change the address, the id of the default address doesn't change so it's still working ok.

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

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