Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: PO Box Shipping

  1. #1
    dsi2 is offline Junior Member
    Join Date
    Sep 2009
    Posts
    17

    Default PO Box Shipping

    Can I edit the "DisAllowShippingToPOBoxes" to include more permutations in order to catch those who are getting through that filter?

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    DisallowShippingToPOBoxes is just a boolean flag, so there aren't many modifications you can make to that itself, however you could modify some of the logic around it, such as how to determine if an address is a P.O. address.

    The easiest thing to do would be to open the solution in Visual Studio and search for DisallowShippingToPOBoxes. You should find ~6 results depending on your version. Where you find them, you can change the way we determine whether or not an address is a P.O. address. For example, in checkout1.aspx.cs you can change the following line
    Code:
    bool IsPOBoxAddress = (Adr1.StartsWith("pobox", StringComparison.InvariantCultureIgnoreCase) || Adr1.StartsWith("box", StringComparison.InvariantCultureIgnoreCase) || Adr1.IndexOf("postoffice") != -1);
    to include other variations or permutations of addresses that you are seeing come though that are indeed P.O box addresses.

    In version 8.0.1.2, the following files have references to DisallowShippingToPOBoxes:
    • Non-Source Files
      • checkout1.aspx.cs
      • createaccount.aspx.cs
      • editaddress.aspx.cs
      • selectaddress.aspx.cs
    • Source Files (requires source code and a recompile)
      • GoogleCheckout.cs
      • Address.cs
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    dsi2 is offline Junior Member
    Join Date
    Sep 2009
    Posts
    17

    Default

    Thanks for the reply. I forgot to mention that this particular store I'm working on is version 7.0.25.

    Also, I found the boolean reference under RejectDueToPOBoxAddress. I tried to exit this in the createaccount.aspx.vb file. The only permutations that were missing were P.O. Box and p.o.box, however, when I tried to add these I received a compilation error. Any suggestions?