Minimum Persons

Closed
Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme Travelo - Travel/Tour/Car Rental/Cruise Booking WordPress Theme January 17, 2019
Login to reply
Kelly R Support Agent
4 years ago
Resolved.
Kelly R Support Agent
5 years ago

Hi,

Please check following code.

<select name="adults" class="full-width">

            <?php  

             for ( $i = 1; $i <= 10; $i++ ) {  

              $selected = ( $i == $adults ) ? 'selected' : '';  

              echo '<option value="' . esc_attr( $i ) . '" ' . $selected . '>' . esc_html( $i ) . '</option>';  

             }  

            ?>  

           </select>


You should get minimum_people before this code.

If this variable is $min, then the code can be following.

<select name="adults" class="full-width">

             <?php   

             for ( $i =$min; $i <= 10; $i++ ) {   

              $selected = ( $i == $adults ) ? 'selected' : '';   

              echo '<option value="' . esc_attr( $i ) . '" ' . $selected . '>' . esc_html( $i ) . '</option>';   

             }   

            ?>   

</select>


I think you can understand it.

And I recommend you hire a developer to do it.

Regards, C-Themes



Kelly R Support Agent
5 years ago

Hi,

Please edit following code you found.

<select name="adults" class="full-width">

            <?php 

             for ( $i = 1; $i <= 10; $i++ ) { 

              $selected = ( $i == $adults ) ? 'selected' : ''; 

              echo '<option value="' . esc_attr( $i ) . '" ' . $selected . '>' . esc_html( $i ) . '</option>'; 

             } 

            ?> 

           </select>

And please note customization is out of regular support.

Regards, 

Kelly R Support Agent
5 years ago

Hi,

It is difficult to set minimum people for tour schedule.

To do it, please edit /inc/admin/tour/schedule-admin-panel.php file.

You can add a new field to minimum people and save it.

And then edit the code that you found based on minimum people.

Regards, C-Themes

Julian Delgado
5 years ago

Hello,

   I created a few schedules for one tour.  One of them has a special price for 3 or more persons.

    I need to know if possible to start the "Adult" Select from 3 (hide 1 and 2), since 1 or 2 persons have different price.  (please see the attachment).

    Or put a minimum quantity in the schedule options (Now it has Max People that is perfect)

    Regards