Jump to content

Send Order ID to Custom Page Post Checkout

Recommended Posts

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
  • Replies 3
  • Views 842
  • Created
  • Last Reply
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}}"

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

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
  • 4 months later...
On 6/10/2021 at 6:49 PM, zambeezy said:

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.

There is an issue with orderId, could you confirm that the value still valid

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.