Announcement

Collapse
No announcement yet.

problem with g.Screen

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    problem with g.Screen

    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 --
    Kent Multer
    Magic Metal Productions
    http://TheMagicM.com
    * Web developer/designer
    * E-commerce and Miva
    * Author, The Official Miva Web Scripting Book -- available on-line:
    http://www.amazon.com/exec/obidos/IS...icmetalproducA

    #2
    If you are using g.screen, try l.screen (the screen value passed in). If not, I'd look to see if someone added code to switch the screen name or is calling another template in SMT (which will do the same thing). For example, if someone called "foo_template" using SMT render, and didn't reset the screen value, that value would be "foo_template".
    Bruce Golub
    Phosphor Media - "Your Success is our Business"

    Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
    phosphormedia.com

    Comment

    Working...
    X