Skip to content
Advertisement

PHP form issue after submit

ill try to submit this form:

JavaScript

after fill in email and ordernr. ill get redirectet to an empty page when i debug i gett my oxid. I want to get the oxid first and redirect after getting the oxid so i can go to the order im searching for.

ill try a lot of things these past 2 days but nothing works.

thats my functio to get the oxid

JavaScript

Im not good at JS so ill tryed only php, can someone give me a little help, thanks a lot

Advertisement

Answer

you don’t need an actual redirect unless you want to prevent visitors from hitting F5 and reloading same page again, which is not necessary here.
Before we start: your variable $sArticleId contains an order Id, to keep the code understandable you should name it $sOrderId.

After you found your order Id you also need to load the order data like this:

JavaScript

In order to keep it simple, you can remove your hidden order id field, put the code for loading the order data into the render() function and pass the order object to the view (template):

JavaScript

In your template you will get the oxOrder object will all the properties and methonds:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement