If a form element’s method attribute is “GET”, submitting the form to the subsequent page will append field values to the URL without you needing to do anything special. The browser handles everything.
In a page’s PHP that handles such a request, the passed field values are available in the $_GET super global array. Once a car is selected and passed on to the next page, after getting the car data from $_GET, use it to query the database for appropriate batteries. Output the query results as part of that page’s form fields so the user can select their preference. (assuming there are more than one possible match, like several price points).
The final order form can then be submitted to an confirmation page that also saves order data to the DB and maybe emails someone as notification to fulfill the order.
There are e-commerce plugins that can help you manage customers, orders, fulfillment, payment, etc. You may still need to custom build the battery selection sequence, but at least some of the other elements are handled for you.
Thank you bcworkz.
I forgot to mention that I am not really that fluent in outside of default WordPress. I mostly did standard static WordPress and business listing.
It would be great if you could walk me through the process and flow on how exactly to do that kind of website. The advance form.
Create a sequence of pages to collect user input. The first (after clicking start ordering) can be a typical WP page to collect location data. For now just collect typed user input without fancy maps, auto-suggest and verification, that can be built later. Subsequent pages need to be based on a custom page template with code to handle data sent from previous pages.
To collect car make and model info, ideally you’d have a database of current information from which a series of cascading dropdowns can be created. Maybe such queries could be made from your battery table? Again, maybe just collect typed user input for now. Work on the dropdowns later. Also place data from previous pages in current form fields (hidden or visible) so that submitting the current form passes all data on to the next page.
Continue in a similar manner for the rest of the pages all the way to order acknowledgement. Custom page template code handles whatever needs to be done on each page.