Custom options for Unified Order Entry

rthrashrthrash Member
in Bugs & Feature Requests edited August 2009
Using unified order entery (UOE) I'd like to do the following to give an internal order form more flexibility:

[ulist]
[li]Add a free ground shipping option to the available shipping methods[/li]
[li]Add a hidden field to the password-protected internal order form:
<input type="hidden" name="h:uoeKey" value="&!@YBV$EDFHJI(NGTD"; />
[/li]
[li]In the checkout, check for the presence of this key[/li]
[li]If it's not found, remove the free shipping option from the set of available shipping methods[/li]
[/ulist]

This could be applied to other things, but this is the simplest example I could come up with. The question is, how? The documentation here is a good start but a concrete example like this would go a long way to being easier to figure out:

http://wiki.foxycart.com/docs:checkout:javascript?s[]=overload
Comments
  • brettbrett FoxyCart Team
    Good question, Ryan.
    I've played around with it but we'll have to dig a little deeper.
  • lukeluke FoxyCart Team
    Hey Ryan. This would probably be your best bet:

    http://forum.foxycart.com/comments.php?DiscussionID=1531&page=1

    jQuery's ajaxComplete can be very helpful. I'm not sure we'll support something like that natively because, honestly, it just really scares me from a security perspective. I know you're super smart and you would protect that secure form and the code for it like gold since that really holds all the keys to the kingdom as far as your customers are concerned, but others might not be that careful. Actually, no, they definitely won't be that careful. If we had something like this built in, my fear is that people would do very stupid stuff with it, customer's personal information would be jeopardized and we'd be to blame for making that customer data available.

    Anyway, will the code described in the post above work for you?
  • brettbrett FoxyCart Team
    Luke, I think the h:value Ryan's talking about isn't the UOE pw itself but just a flag that order was generated from a "back end" order form. It'd be nothing that'd be a security risk.

    (Ryan, if that's not what you'd intended, just pretend it is ;)
  • You'll note that that key is not nearly long enough to be a UOE key by any stretch. 1Password is there for a reason! Yeah it's definitely just an obscure flag to show/hide some stuff and that can be quickly changed from time to time. :)

    And if it wasn't I'd definitely pretend. :P
  • lukeluke FoxyCart Team
    Cool. It sounds like you can do all of this with some JavaScript in your checkout template. If not, please let us know.
Sign In or Register to comment.