WIX CODE HELP BOOKING TRAVEL TRANSPORT

I do not have a great knowledge in PHP languages and I want only to know how to make such an equation if we want to say.

For example :
The customer wants to travel from France to German,
how I give the robot: France + German = Link 5
I created links from each destination but I can not attach them !
My Wix Website https://www.taxirabattours.com/
I need help …

Thanks,

Hey
Wix Code is Javascript based so you do not need any knowledge of PHP here.

Then you need to read the guidelines for this forum and edit your post. Describe more what you have done, paste in code, upload screenshots to your post. The more you give the easier it will be for us to help.

With the current post there is nothing I can do to help you here. Please edit and post again with more details on the issue you want to get help doing.

Hi, Thank you for your reply,
I will try to explain a little the problem to know what I want,
My website aims to offer the possibility to book transport vehicles, so the customer must choose their destination as it is indicated in the photo below


Then the route chosen here is from Rabat to Mohamadia


I want the button “Book Now”, know that it’s Mohamedia destination, and show me the window of Mohamedia that I already created, as indicated in the picture below


I Need Help.
Thanks,

@taxicabrabat OK as Andreas points out you need to have some basic javascript skills to do this effectively or you may be better off hiring a Wix Code Expert.

If you want to do this your self I suggest that you review the Articles that discuss how to use datasets and data collections and how to navigate to a dynamic page from a dropdown AND the forum posts that have been made and answered regarding the use of multiple drop downs to filter data sets.

Here are some pointers for you:

Here is a summary of the steps you will need to take:

  • In your data collection you need to have a from column and a to column.

  • Each row in your data collection will need to be one of the routes that you want to share information on. So From = Rabat & To = Mohamadia will be one row. From = Mohamadia & To = Rabat will be a new row for the return.

  • Once you have all of your rows set up you can then use the information in the last url above to figure out how to create a unique list of To locations and a unique list of From locations.

  • You can assign these lists to the drop downs you have so you now have a way to filter your data collection by From and To.

  • Again using the post information you need to add an onChange handler that detects when BOTH the From and To drop downs have changed. When you have detected that you have a From and a To location you can query (filter) your data collection for the row which contains the From and To values that were selected in the drop downs.

  • When you get the row from the data collection & if you have connected a dynamic page to the Collection, you will be able to access a Dynamic page column with a URL that you need to navigate to based on the selection.

  • Once you have the URL in this column you can use the wix-location API to() function to navigate to the page you need!

Hopefully this will get you where you need to get to.

Cheers
Steve

2 Likes

I am sorry I haven’t had the time to answer you but I am very happy Steve had. His answer is super and a great way for you to get started.

@stevendc Hi Steve,
Really a big thank you for this answer, despite that after the first reading I find myself in front of new concepts, but I feel that the solution is in this message and it makes me excited, thank you again I will well decipher your message and we will see our result.
Thanks
Farouk

1 Like

Hi Farouk
The forum code experts are busy people and ma t are happy to help once you have had a go at creating the page and writing the code yourself. Most developers will help if you have a specific problem or error you want help resolving. But if you ask a question that requires a project to solve then you may not get the answer you expect :-).

Have a go at solving the problem and come back to the forum with a specific question, on your solution if you get stuck, in a new post.

Cheers
Steve

1 Like

Closed due to spam.