Anyway to make Adults 0 -- so the customer chooses

Discuss everything related to PHP Hotel Site. All versions. Any questions related to the PHP Hotel Site developing or using should be posted to this forum.

Moderators: ne_moj, zewa

eberswine
Expert
Expert
Posts: 61
Joined: Aug 2nd, '12, 01:54

Anyway to make Adults 0 -- so the customer chooses

Postby eberswine » Feb 16th, '17, 20:21

On the booking form -- we have so many customers just leave the "Adults [1]" as the default when they check out.

Anyway to have the form have the "Adults [0]" -- and have it required to choose a number --??

That way the customer will most likely choose the number of Adults !

??

THANKS!

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Anyway to make Adults 0 -- so the customer chooses

Postby administrator » Feb 19th, '17, 12:20

What script and version do you speak about?
Can you show us this issue online?

eberswine
Expert
Expert
Posts: 61
Joined: Aug 2nd, '12, 01:54

Re: Anyway to make Adults 0 -- so the customer chooses

Postby eberswine » Mar 2nd, '17, 16:02

Using ApPHP Hotel script 4.0.3

We have a problem with people not CHOOSING how many people are reserving the room..

There are many forms on the internet that have "0" as the default instead of "1"

Anyway to change to "0" and require that they choose a number ?

Image

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Anyway to make Adults 0 -- so the customer chooses

Postby administrator » Mar 3rd, '17, 10:35

Your version is too old.
Please upgrade yuor script to 4.4.3

eberswine
Expert
Expert
Posts: 61
Joined: Aug 2nd, '12, 01:54

Re: Anyway to make Adults 0 -- so the customer chooses

Postby eberswine » Mar 13th, '17, 16:07

so you mean if I upgrade, then I will have the option ?

administrator
Site Admin
Site Admin
Posts: 5939
Joined: Jan 7th, '09, 23:18
Contact:

Re: Anyway to make Adults 0 -- so the customer chooses

Postby administrator » Mar 13th, '17, 18:34

Yes, it must fix this issue.

eberswine
Expert
Expert
Posts: 61
Joined: Aug 2nd, '12, 01:54

Re: Anyway to make Adults 0 -- so the customer chooses

Postby eberswine » Mar 13th, '17, 19:38

Must be some confusion.

I just logged into your demo site running the latest version and it seems to be exactly the same and there are no options...

I basically want users to "REQUIRE" to choose "How Many" people are in each room. Instead of having it default at "0" ...?

Make sense ?

Thanks.

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: Anyway to make Adults 0 -- so the customer chooses

Postby ne_moj » Mar 14th, '17, 10:41

Hello

You can give a link where you looked through the example, I'm looking here - http://www.apphp.com/php-hotel-site/exa ... ailability and I do not see the described problem.

Regards

eberswine
Expert
Expert
Posts: 61
Joined: Aug 2nd, '12, 01:54

Re: Anyway to make Adults 0 -- so the customer chooses

Postby eberswine » Mar 26th, '17, 14:18

So instead of having [ 1 ] for a default for Adults.

I wonder if it is possible to make the default [ 0 ] and a validation/notification/required box would pop up and ALERT - "Please choose How many Adults?"

That way, the user will choose how many are coming. Usually when it is defaulted at [ 1 ], they NEVER change it and bring 4-5 people AHHH!

ne_moj
Master
Master
Posts: 243
Joined: Jan 1st, '16, 14:11

Re: Anyway to make Adults 0 -- so the customer chooses

Postby ne_moj » Mar 31st, '17, 13:14

Hello eberswine

You need to add the message "Please choose How many Adults?" In the database (table <DB_PREFIX> vocabulary). <DB_PREFIX> is the prefix for all tables
Example sql for 3 languages:

Code: Select all

INSERT INTO `<DB_PREFIX>vocabulary` (`id`, `language_id`, `key_value`, `key_text`) VALUES (NULL, 'en', '_CHOOSE_MANY_ADULTD', 'Please choose How many Adults?'), (NULL, 'es', '_CHOOSE_MANY_ADULTD', 'Por favor, seleccione ¿Cuántos Adultos?'), (NULL, 'de', '_CHOOSE_MANY_ADULTD', 'Bitte wählen Wie viele Erwachsene?');


After adding a message to the database, you need to update the language constants in the admin panel.

It is also necessary to make a test in which 0 adults will be considered an error. To do this, edit the page/check_availability.php file after the lines

Code: Select all

if($checkin_year_month == '0' || $checkin_day == '0' || $checkout_year_month == '0' || $checkout_day == '0'){
   draw_important_message(_WRONG_PARAMETER_PASSED);


You need to add the following code:

Code: Select all

}else if($max_adults < 1){
   draw_important_message(_CHOOSE_MANY_ADULTD);


Return to “ApPHP HotelSite / uHotelBooking Talk {developers/users}”