EDIT: I have a jekyll site store that uses one form layout that is for 3 different product pages by using jekyll collections to apply variables to modify the form contents while using the same form layout.
This works great but I want each form to link its own custom success page. I’ve been trying to do this by using the “action” attribute in the tag in the source layout file.
When the form is sent, it successfully links to the corresponding custom url for each of the different product pages. The problem is that although the browser goes to the correct url, it displays the Netlify default success page:
Or alternately, sometimes it inexplicably displays one of the product pages, but it’s always the same one even when it’s not that product that was chosen. The url is “…/tarotcart” so the info should be for a tarot reading, yet the product info is for the career chart.: https://photos.app.goo.gl/St4wn8pVkDnjibVD7
So basically, my question is: how can I get the browser to display the correct success page for these product forms?
Summary
The problem is that the payment page shows the wrong product details (the front matter variable from another product).
Here’s a link to the tarot payment page.
https://www.clarkiniaastrology.com/purchases/tarotcart
This link displays the correct product, price and description (according to front matter variables). However when this page is accessed via the tarot reading product page form action (https://www.clarkiniaastrology.com/readings/tarot/) the variable info is for the wrong product: the career chart product, even though it’s supposed to be the tarot reading url.
Here’s a screenshot of my browser after choosing a tarot reading from the tarot product page. The url is “…/tarotcart” so the info should be for a tarot reading, yet the product info is for the career chart.
https://photos.app.goo.gl/St4wn8pVkDnjibVD7
Not sure if this is a problem with how the product page form action is set up. Or if it’s how the front matter variables are being accessed on the payment page. Or something completely different.
Thanks for your help. Hope this makes sense.
Here’s the form code: