Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
veldepatrick

Make housenumber required field - problem

Question

Hi,

In the standard version of Thirty Bees (and Prestashop), entering a housenumber is not required. So (too) many times customers forget to fill in their housenumber in the Adress1 field. It costs me lots of time to mail and get the housenumber from the customer, and also it doesn't look very professional.

So I searched the forums for a solution and I found one (on Dutch forum):

https://www.prestashop.com/forums/topic/463199-huisnummer-verplicht-adres-veld/

Gladly, this works, also for thirty bees. But when I upgrade from thirty bees 1.07 to 1.08 it doesn't work anymore for 'add different invoice adress'. The screen just hangs.

So my question is, if someone has a good solution for making the housenumber field (address2 field) required for normal and invoice address without anything breaking.

Does anyone know why this feature to make address field 2 required isn't a standard option in 'Preferences - Customers'? Will it be in future?

 

Kind regards,
Patrick

 

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The thought of the house number is ok - but I personally would rather set up an extra field.

is the label of the field sufficient? eg is your translation also house number with in it or only street? the second address field makes sense for my clients, depending on the region, post office box etc.

the problem is probably for some that when shipping with the address in the foreign country, the house number in front of the street name as a field will enter, as it is common in the country.

but back to your question:
have you checked the data after the update, possibly these were overwritten by this and you must enter the change again / save and possibly cache etc delete.

Share this post


Link to post
Share on other sites
  • 0

Hi, thanks for your reply.

I now use address2 field for the required housenumber, I was also able to translate and add 'housenumber' text, so it works.

Before the upgrade, I downloaded the files I have changed and after the upgrade I uploaded the same files in same location:

  • classes/Address.php
  • Themes/warehouse/order-opc-new-account.tpl
  • /theme/css/global.css 

The changes I did are described in the post https://www.prestashop.com/forums/topic/463199-huisnummer-verplicht-adres-veld/

 It worked for me before with every upgrade. And it does work everywhere, except when a customer wants to add an invoice address besides his normal address, the screen just hangs.

Maybe I need more thorough error checking, but hoped maybe someone had a better/ other solution for making a required housenumber field.

 

 

Share this post


Link to post
Share on other sites
  • 0

I would dig deeper into it. What is the problem? You said the screen hangs. Is it just a blank white page? Do you have the debug mode on?

Btw: in our country there exit also addresses without numbers. If you make it mandatory, be sure that in your shipping countries it cant be an issue...

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

Hi yes I understand in some countries it can give problems, but I only ship to Netherlands and Belgium. So no issue 🙂

Yes, I will dive deeper into it. Problem is it's a live shop. So I first need to setup a test shop etc. I'll do some tests and debugging, hopefully I can post an answer soon.

No easy fix or alternative I'm afraid 😉 

Edited by veldepatrick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×