Adding CONTACT FORM SECTION to ORDER STATUS PAGE, but its not working properly.

Hi there.

On the ORDER STATUS PAGE, I have created a simple contact form section where the customer can immediately contact us about the order.

additonal script section in checkout setting, code as below


This section appear on the order status page and will be delivered as an email when you enter your inquiry.

So far, so good as I expected.

However, after clicking the submit button, browser is redirected to the top page as URL ‘/?contact_posted=true’.

It’s better to go back to the ORDER STATUS PAGE.

It’d be nice if there was a parameter to specify the return destination URL.

My plan is NOT Shopify PLUS.

Can you help, please.

Hi @Kanakano

You can try add this snippet:
{% if form.posted_successfully? %}

{% endif %}

Hey @LitExtension ,

Thank you your replying.

Sorry for the delayed response. (I missed a notification mail. xD)

I guess it means that if I put that snippet in the destination (top page) after posting a message, I can indeed move it to any page I want (maybe the “thank you for posting” page), but I want to move it back to the order status page.

There is no clue in the form object or the URL to know “from which order status page the message was sent”. (If there is such a thing and I just don’t know about it, please let me know)

There is a way to set the URL of the order status page and the order ID in the browser’s DB or cookie before sending a message, but I don’t think it is reliable. (If there is no other way, I’ll try it.)

regards