Hi folks,
I'm working on a project where I've added a text box to the OCST page for a custom basket field. If the customer doesn't enter something in the box, I want to display an error message and return them to OCST instead of going on to OSEL. I used to do this with a system-ex module that would check for the error condition and, if necessary, change the value of g.Screen to "OCST" to return the customer to the original page (as well as returning -1 to cancel the ORDR action).
For some reason, this isn't working. Instead of OCST, I get redirected to the storefront. There seems to be something in the store that is preventing the changed value of g.Screen from having the usual effect, and uses the storefront as a default. Has anyone seen this? How can I fix it? I suppose I can use some Javascript to validate the input before the form is submitted, or even use a 302 redirect; but I think there's probably a cleaner solution. Hope someone can help; I'm on something of a tight schedule here.
Thanks --
I'm working on a project where I've added a text box to the OCST page for a custom basket field. If the customer doesn't enter something in the box, I want to display an error message and return them to OCST instead of going on to OSEL. I used to do this with a system-ex module that would check for the error condition and, if necessary, change the value of g.Screen to "OCST" to return the customer to the original page (as well as returning -1 to cancel the ORDR action).
For some reason, this isn't working. Instead of OCST, I get redirected to the storefront. There seems to be something in the store that is preventing the changed value of g.Screen from having the usual effect, and uses the storefront as a default. Has anyone seen this? How can I fix it? I suppose I can use some Javascript to validate the input before the form is submitted, or even use a 302 redirect; but I think there's probably a cleaner solution. Hope someone can help; I'm on something of a tight schedule here.
Thanks --
Comment