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

#   2 house numbers after update Myparcel plugin

##

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

Less More

- Posts: 220
- Thank you received: 8
-
-
-

3 years 9 months ago [\#348315](#348315) by [Udo](/forum/user/29928-udo "View Udo's Profile")  *[2 house numbers after update Myparcel plugin](/forum/28-shipping-methods/905714-2-house-numbers-after-update-myparcel-plugin#348315 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.11 -- PHP version -- : 8.0.25  Hi, I've updated an outdated 2020 version of the Myparcel label and track plugin. Now we use version 1.1.4  In our address configuration street and house number have two seperate fields. The house number is in field address&#95;street2. To make that work in the old plugin we added custom code to myparcel.php like Nicolas suggested in the forum. That worked fine.  After the update this hack is unnecessary since Hikashop added a house number field in the settings of the plugin. But now the house number shows twice in the labels! The number is displayed in the same line as the street name and once more in a new line. See screen prints.  Please advise. Udo")* was created by *[Udo](/forum/user/29928-udo "View Udo's Profile")*

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 3.10.11
-- PHP version -- : 8.0.25

Hi,
I've updated an outdated 2020 version of the Myparcel label and track plugin. Now we use version 1.1.4

In our address configuration street and house number have two seperate fields. The house number is in field address_street2.
To make that work in the old plugin we added custom code to myparcel.php like Nicolas suggested in the forum. That worked fine.

After the update this hack is unnecessary since Hikashop added a house number field in the settings of the plugin.
But now the house number shows twice in the labels! The number is displayed in the same line as the street name and once more in a new line.  [ ![label-myparcel-twonumbers.jpg](/forum/attachment/56319) ](/forum/attachment/56319 "...twonumbers.jpg")

[ ![myparcelform-fields-used-by-numbers.jpg](/forum/attachment/56320) ](/forum/attachment/56320 "...by-numbers.jpg")

See screen prints.

Please advise.
Udo

- [ ![label-myparcel-twonumbers.jpg](/forum/attachment/56319) ](/forum/attachment/56319 "...twonumbers.jpg") [ ](/forum/attachment/56319?download=1 "...twonumbers.jpg")
- [ ![myparcelform-fields-used-by-numbers.jpg](/forum/attachment/56320) ](/forum/attachment/56320 "...by-numbers.jpg") [ ](/forum/attachment/56320?download=1 "...by-numbers.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvOTA1NzE0LTItaG91c2UtbnVtYmVycy1hZnRlci11cGRhdGUtbXlwYXJjZWwtcGx1Z2luP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

3 years 9 months ago [\#348319](#348319) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[2 house numbers after update Myparcel plugin](/forum/28-shipping-methods/905714-2-house-numbers-after-update-myparcel-plugin#348319 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.11 -- PHP version -- : 8.0.25  Hi, I've updated an outdated 2020 version of the Myparcel label and track plugin. Now we use version 1.1.4  In our address configuration street and house number have two seperate fields. The house number is in field address&#95;street2. To make that work in the old plugin we added custom code to myparcel.php like Nicolas suggested in the forum. That worked fine.  After the update this hack is unnecessary since Hikashop added a house number field in the settings of the plugin. But now the house number shows twice in the labels! The number is displayed in the same line as the street name and once more in a new line. See screen prints.  Please advise. Udo")*

Hi,

You should:
- create a new custom field of the table "address" to store the house number
- change the "address format" setting in the HikaShop configuration to add the corresponding tag
- run an address mass action to copy the address_street2 to that new custom field for all the existing addresses
- run an address mass action to empty the address_street2 field
- change the settings of the MyParcel plugin to use that new field instead of the address_street2 field for the house number.
- optionnally, you can deactivate the address_street2 field or rename it to "additional information" or something like that so that the customers can provide extra information on the address.

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

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

Less More

- Posts: 220
- Thank you received: 8
-
-
-

3 years 9 months ago [\#348392](#348392) by [Udo](/forum/user/29928-udo "View Udo's Profile")  Replied by *[Udo](/forum/user/29928-udo "View Udo's Profile")* on topic *[2 house numbers after update Myparcel plugin](/forum/28-shipping-methods/905714-2-house-numbers-after-update-myparcel-plugin#348392 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.11 -- PHP version -- : 8.0.25  Hi, I've updated an outdated 2020 version of the Myparcel label and track plugin. Now we use version 1.1.4  In our address configuration street and house number have two seperate fields. The house number is in field address&#95;street2. To make that work in the old plugin we added custom code to myparcel.php like Nicolas suggested in the forum. That worked fine.  After the update this hack is unnecessary since Hikashop added a house number field in the settings of the plugin. But now the house number shows twice in the labels! The number is displayed in the same line as the street name and once more in a new line. See screen prints.  Please advise. Udo")*

Hi Nicolas,

Thanks for the plan of action. However, it's quite a hassle. There are about 15,000 addresses.
And to be honest I don't know how to set up a mass action to copy the address_street2 to the new custom field.

For now I've applied a simple modification to myparcel.php that I used before in the old version of the plugin.
I've commented these 2 lines Code:

// if(!empty($order-&gt;shipping_address-&gt;address_street2)) // $consignment-&gt;setStreetAdditionalInfo($order-&gt;shipping_address-&gt;address_street2);

That's certainly not the best solution, but the second house number is gone. I hope there are no drawbacks.

Regards,
Udo

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3NoaXBwaW5nLW1ldGhvZHMvOTA1NzE0LTItaG91c2UtbnVtYmVycy1hZnRlci11cGRhdGUtbXlwYXJjZWwtcGx1Z2luP3RtcGw9bWFya2Rvd24=) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14265
-
-

3 years 9 months ago [\#348395](#348395) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[2 house numbers after update Myparcel plugin](/forum/28-shipping-methods/905714-2-house-numbers-after-update-myparcel-plugin#348395 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 3.10.11 -- PHP version -- : 8.0.25  Hi, I've updated an outdated 2020 version of the Myparcel label and track plugin. Now we use version 1.1.4  In our address configuration street and house number have two seperate fields. The house number is in field address&#95;street2. To make that work in the old plugin we added custom code to myparcel.php like Nicolas suggested in the forum. That worked fine.  After the update this hack is unnecessary since Hikashop added a house number field in the settings of the plugin. But now the house number shows twice in the labels! The number is displayed in the same line as the street name and once more in a new line. See screen prints.  Please advise. Udo")*

Hi,

The mass action will allow you to process all the addresses at once, so whether you have 10 addresses or thousands, it shouldn't matter.
The mass action is not that complex. For the first mass action, you need just an action 'update the values' on the column XXX (where XXX is the column name of the new custom address field) with the mode "operation" and the value address.address_street2
You also need to increase the number of elements from 500 to 20000 in the "limitations" area so that it can handle all the addresses at once.
For the second mass action, you do the same but on the address_street2 column with the mode "string" and the value left empty.

You sure can modify the code of the plugin. No drawbacks. You'll just have to redo the modification each time you update the plugin.

The following user(s) said Thank You: [Udo](/forum/user/29928-udo "View Udo's Profile")

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

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

[](#top)
