sports guy:
lhungil,
I am confused so seeking clarification: On the second part of your statement:
You are saying I would have the ability to add a residential and business checkbox and force them to select for the shipping address? Would this same module calculate the COM and RES rate differences according to the said checked boxes (residential/business)? It looks like you are saying I would have to have both beta modules installed plus coding tweak to get the functionality I am seeking.
As far as beta-testing for me, the store I am working on is busy and has several sales per day. So I would be afraid to lose customers while I beta test. And I would really like to test!
Sorry for the confusion, was typing out that message on only a couple hours of sleep. And completely agree this is something to deploy to a test or staging area before deploying to a live site! I've finished creating a distribution zip for the dimensional / dropship / product packaging solution... But will need a little time to create the distribution zip for either of the below options (before this thread have not seen a large demand, so have not bothered to take the time to put together a BETA package).
If you wanted to save the answer in the database: You would need one BETA module for handling the residential / commercial (I used a yes / no dropdown, it could be changed). Adding a "residential / commercial" capture when the address is entered does require modifications to a large number of templates and some pages. With this in pace a couple lines of code in the UPS shipping module are needed to check what the customer chose. The dimensional / dropship / custom package module is separate and not needed for the residential / commercial dropdown (but has an example w/ the needed lines of code for the shipping module).
[Attachment no longer available]
I ended up going this route for a number of reasons, and it seems to work well on one the one test / production store All of the text (other then the yes / no) are stored in language files and can be changed to suit your store's needs (or to remove some options). As you can probably tell it was originally added to handle additional information required for offering freight shipping. I have both BETA modules running on one test and one production Zen Cart site (so far have not seen any major issues, but hesitant to say these two modules are ready for mass consumption).
If the goal is just to ask on the checkout_shipping page (not saved with the address): You could do this specifically on the checkout_shipping page... You would probably want to show the option on the checkout_payment and checkout_confirmation as well. This does require some changes to templates and also an observer to add the chosen option to the order comments field (if you want to save the choice with the order for reference). Let me look through some of my old code as I have a "shipping quote" module which includes most of this functionality (and the relevant portions can be copied for UPS) - it may be a simpler method if you only want to ask during checkout_shipping and not actually store the value in the database.
Other thoughts: Maybe one of these days I will get some time to look more into the UPS Address Verification API and see if it would let us check if an address is residential / commercial without asking a customer. If anyone knows the answer to this question, please let us know!
The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker