[solved] only accept orders from certain Australian 4 digit post codes starting with 5

sunsurfsunsurf Member
in Help edited May 2011
Hello,

I am setting up foxycart 0.7.1 with a modx evo 1.0.5 site in Australia for a small home delivery service that is localised to certain postcodes (zip codes) - purchase order method only at the moment.

Is is possible to only accept orders from certain postcodes (they start with 5 and are four digit)? And to advise which days the client delivers to the various post code in the receipt?

I'd love a success message in the receipt something like:
We deliver to your area on <day>.

And an unsuccessful message:
Sorry, we do not deliver to your suburb at the moment.

I have seen the "Limit Orders to select Zipcodes" forum post on this page (http://forum.foxycart.com/comments.php?DiscussionID=4397) but our requirements are slightly different and I am an absolute javascript novice.

Any ideas?

Thanks in advance.
Comments
  • fc_adamfc_adam FoxyCart Team
    @sunsurf,

    Just to clarify, do you want to only ship to the postcodes you listed, or allow customers to set any SA based postcode as the shipping address and successfully checkout but tell them you don't deliver to them. Is that right?
  • hi fc_adam,

    "do you want to only ship to the postcodes you listed"

    yes please, the client will only deliver to the postcodes listed - so I guess only letting checkout happen if a postcode in the list is inputted is the way to go.

    With unsuccessful error message:
    Sorry, we do not deliver to your suburb at the moment.

    And somewhere in the receipt it would be incredible to have a success message with the day mentioned relative to the postcode list:
    We deliver to your area on <day>.

    Sorry, I think I was over complicating the original request with the multiple error types.

    "or allow customers to set any SA based postcode as the shipping address and successfully checkout but tell them you don't deliver to them."
    If its one of the other, this is a No - I think this might annoy customers more.

    Thanks so much fc_adam.
  • fc_adamfc_adam FoxyCart Team
    Hey Sunsurf,

    If you paste this into your checkout template it should get what you're looking for. You'll need to customise the postcodes to match the postcodes you're allowing for the days they set the deliveryDay variable to: http://pastie.org/private/8plnp3j5rbojdtbmkcljpq
  • Thanks fc_adam,

    That is perfect.
Sign In or Register to comment.