Okay
  Public Ticket #1385277
Specific destinations in search box drop-down
Closed

Comments

  •  2
    George started the conversation
    For example, I have destinations A/B/C, the transfer plugin will auto assign those destinations to all departure/pick-up by default.

    But my situation is kind of oneway triangle, customer can only start from A/B to C, and from C back to A/B. They can not start from C. 

    Could please help me how to restrict those destinations in search box drop-down like:

    Departure:  A/B

    Pick up: C

    return Departure: C

    return Pick up: A/B

  •  2,057
    Theme replied

    Hi Georgeniu,

    You would need to edit wp-content/plugins/transfers-plugin/includes/widgets/widget-advanced-search.php to achieve this.

    In particular you would change these lines (around line 158)

    <div class="form-group select one-third">
        <label><?php esc_html_e('Pick up location', 'transfers'); ?></label>
        <?php echo wp_kses($select_pickup_location1, $allowedtags); ?>
    </div>
    <div class="form-group select one-third">
        <label><?php esc_html_e('Drop off location', 'transfers'); ?></label>
        <?php echo wp_kses($select_drop_off_location1, $allowedtags); ?>
    </div>

    to something like this:

    <div class="form-group select one-third">    
         <label><?php esc_html_e('Pick up location', 'transfers'); ?></label>
         <select id="pickup1" name="p1">
             <option value="123">Some pick up location</option>
             <option value="123">Some pick up location 2</option>
         </select>
    </div>
    <div class="form-group select one-third">
        <label><?php esc_html_e('Drop off location', 'transfers'); ?></label>
         <select id="dropoff1" name="d1"></select>
             <option value="123">Some drop off location</option>
             <option value="123">Some drop off location 2</option>
         </select>
    </div>

    Similarly, you would change the second set of lines (around line 182)

    <div class="form-group select one-third">    
          <label><?php esc_html_e('Pick up location', 'transfers'); ?></label>    
          <?php echo wp_kses($select_pickup_location2, $allowedtags); ?>
    </div>
    <div class="form-group select one-third">    
          <label><?php esc_html_e('Drop off location', 'transfers'); ?></label>    
          <?php echo wp_kses($select_drop_off_location2, $allowedtags); ?>
    </div>

    to

    <div class="form-group select one-third">    
         <label><?php esc_html_e('Pick up location', 'transfers'); ?></label>
         <select id="pickup2" name="p2">
             <option value="123">Some pick up location</option>
             <option value="123">Some pick up location 2</option>
         </select>
    </div>
    <div class="form-group select one-third">
        <label><?php esc_html_e('Drop off location', 'transfers'); ?--></label>
         <select id="dropoff2" name="d2"></select>
             <option value="123">Some drop off location</option>
             <option value="123">Some drop off location 2</option>
         </select>
    </div>

    Obviously, i put in value 123 and text Some drop off location etc, that is where you need to put in your specification destinations in order to properly restrict things as per your needs.

    Best regards,

    themeenergy support

  •  2
    George replied

    Thanks, it'll help me lot!

  •  2,057
    Theme replied

    You are welcome.

    Best regards,

    themeenergy support

  • peterkibe08 replied

    George, kindly let me see your site,


    i might be looking for the same problem solution

  •  2
    George replied

    Sorry my site is still in local development that can’t be served with an online url.

    I just fellow the support team’s suggestion, and you need to find the destination id( option value) through SQL database.

  • peterkibe08 replied

    Oh Ok George,

    I needed this desperately.

    Are you able now to set specific destinations to specific airport example

    if you select airport "A" in the "pick -up" and destinations A1, A2, A3 comes in the drop off.

    if you select airport "B" in the "pick -up" and destinations B1, B2, B3 comes in the drop off.

  • peterkibe08 replied

    www.book.airporttransfers.ea.com

    this is my site,


    i want when one selects "Eldoret airport", only "eldoret destinations" will appear in the drop down.

  • peterkibe08 replied

    Dear george,


    please see my site when i did put the code

  •  2
    George replied

    You mean dynamic change the input field option? I am not sure how to do this exactly, but I think it can be done through javascript or jQuery.

    Maybe we can wait themeengry team add this feature.

  •  2,057
    Theme replied

    Hi,

    This is not a feature of our theme, however, we are aware that customers would find the feature useful and we hope to implement it in the future.

    Thanks for your patience.

    Best regards,

    themeenergy support