Return URL from checkout to custom product page

  • Posts: 27
  • Thank you received: 0
11 years 6 months ago #133284

Hi there,

I'm trying to resolve a small issue :

I've made a custom page for a single product with many options (i only have one product on the website, with lots of "item" custom fields), so i'm using a form to send parameters to hikashop and proceed with the checkout. I also created a simple plugin based on the function onBeforeCartUpdate to erase the cart before adding my custom product, and i don't provide any "return url" in the hidden fields of my form for now.

Everything works fine, but i'm having a little issue with the return URL : once the customer is in the hikashop checkout, if he hits the "back" button of his browser, he can't go back to the form, he gets an error message and then needs to refresh the page to go back to the form.

I'm not sure if and where I could change the code to allow the user to go back to the product form ? Should i add a return url as a field in my form ?

Once again, this is a very little issue, i can keep it that way, but it would be great if I could correct this.

Please Log in or Create an account to join the conversation.

  • Posts: 83933
  • Thank you received: 13588
  • MODERATOR
11 years 6 months ago #133355

Hi,

That's standard in browsers when you submit a form. If the user goes back, the browser ask him to validate. The solution is to not submit a form but to send the parameters as GET parameters (so in the URL). Not elegant at all. Or you do a 303 redirect after the post ( via a view override) to the same URL with an additional parameter in the URL (or one less) in order to avoid the warning.

Please Log in or Create an account to join the conversation.

Time to create page: 0.053 seconds
Powered by Kunena Forum