Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Send Order ID to Custom Page Post Checkout


zambeezy

Question

Site URL: https://foreverincrystal.com/customize-your-order

I am working on a custom checkout process for a customer that allows their products to be customized with either a message or image on any selected product. After significant research and testing, I've determined that the best solution is to create a custom form (using getform) that the customer is redirected to after completing their checkout. I use the following script to redirect the user to the customize order form:

<script> window.location.replace("/customize-your-order"); </script>

Everything works great, the redirect happens correctly, and the form submissions appears and works when the fields are completed. The issue is that the user experience is not ideal. As a customer, I need to know my order number and other detailed to manually input them in the form. I'd like to pass the orderId to the customize-your-order form so that I can preload the fields for the user.

Does anyone know if there is a way for me to pass the orderId to the custom squarespace page on redirect so that I can get the order details and preload them for the user?

Side note, if anyone has any suggestions for a better way to add either a message or image a product, I am open to suggestions. The requirement is that if an image can be upload when selecting the product to add to the cart, that image must also be able to be changed in the shopping cart. I found that this is not possible leading me to my current approach.

Link to comment

2 answers to this question

Recommended Posts

  • 1
On 6/8/2021 at 9:58 AM, zambeezy said:

Site URL: https://foreverincrystal.com/customize-your-order

I am working on a custom checkout process for a customer that allows their products to be customized with either a message or image on any selected product. After significant research and testing, I've determined that the best solution is to create a custom form (using getform) that the customer is redirected to after completing their checkout. I use the following script to redirect the user to the customize order form:


<script> window.location.replace("/customize-your-order"); </script>

Everything works great, the redirect happens correctly, and the form submissions appears and works when the fields are completed. The issue is that the user experience is not ideal. As a customer, I need to know my order number and other detailed to manually input them in the form. I'd like to pass the orderId to the customize-your-order form so that I can preload the fields for the user.

Does anyone know if there is a way for me to pass the orderId to the custom squarespace page on redirect so that I can get the order details and preload them for the user?

Side note, if anyone has any suggestions for a better way to add either a message or image a product, I am open to suggestions. The requirement is that if an image can be upload when selecting the product to add to the cart, that image must also be able to be changed in the shopping cart. I found that this is not possible leading me to my current approach.

Did you try these variables on the advance injection

image.png.b80e47a897c52998f19c95078817afd6.png

After checkout page show up you can parse the value to your url as parameter

"/customize-your-order?orderId={{orderId}}"

Greeting, it's BaNgan from BeyondSpace, I am Squarespace dev focus on provide solutions to enhance feature that squarespace.com can't provide.
Feel free to check my current Squarespace Plugins Developement: Enable Pinch/Zoom on lightbox, Delivery Date Picker, Youtube Gallery for Squarespace
If you find my answer fit your need, let's leave a like or upvote so others with the same issue can find their solution. Thank you

Link to comment
  • 0

This solution worked, thank you! Note that I used:

"/customize-your-order?orderId={orderId}"

Because it did not like the additional brackets. Now I just need to figure out how to collect the parameters and display them in the form on the page.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...