want to add a query to a page

hello im trying to add query to an page its an appointment page i need the product id to get to book and appointment so tried something normal

/appointment?product_id=23

but im getting page not found how to send query parms to a page

Do you have a working page at /appointment?

The way I would set this up is to have a custom template for the appointment page, then set up a Sage composer to capture the product ID and then do the query needed to show your appointment form. From your composer you could pass any data needed for your appointment form back to your template’s Blade view.

For more information on composers in Sage I wrote an article you might find helpful.

yea i have a page called appointment and when open the /appointment page it show the appointment form when open it with /appointment?product_id=23 its show 'Not Found ’

Have you tried refreshing the permalinks?

Also, have you tried putting a / before the ?
/appointment/?product_id=23

1 Like