So far I've investigated the code behind address.module, store.module, store.location.inc, ec_location, location.module, shipcalc.module, and ec_region.module ... and I can't see how to get any of them to play together.
What am I missing?
I need the customer to fill out their address with the region as a selectbox.
search results like Dropdown Menu for State and customize address forms didn't seem to provide the right answers
I need the 'region' (non-US, but I can find ways to hack that in myself) to be a select, because at the next step of a transaction, the shipping calculator API (also in development for a local courier firm) simply needs to depend on a correctly spelled, restricted list of locations to provide the quote. These are heavy items, and distance makes a difference.
Now ... I see that the existing 'address book' fills its own historical needs, and probably grew up independently of location.module, but now I have a customer profile page with an OK 'address' form on it (with a region selector yet) that's incompatible with the customer profile 'address book' entry. :-{
I don't mind trying to hack a little code, but um, which of the above listed modules should I be doing it on? How dangerous would it be to try and use the (more useful looking) location.module location_form() instead of the address.module address_form_fields() ?
I've so far tried just injecting the province list (from location.module) into the ec version, but I feel dirty already.
AND I see store/store_location.inc is doing its own, different thing too. It provides a hand-crafted list of states - without reference to the fuller location.api ... and then applies it only to 'store' settings and not customer addresses. :-(
Help! I'm lost.
Can someone suggest the best practices or right way to work towards resolving some of this? What module is known to be a bit redundant or in need of a review, and which is the one to look at and learn from?
I don't even want to think about country-state dependant dropdowns, I can live with a page refresh, and won't be looking at international shipping yet anyway.
Can someone just tell me where to push in the code? Normally with Drupal I've found that the modifications needed are tiny ... provided you've found the right crack to wedge your lever into. It's finding the right spot that takes a day or two.
Comments
Comment #1
brmassa commentedComment #2
jturnbull commentedMy problem is similar. What the best way to insure a user enters OH, rather than Ohio?
Comment #3
csc4 commentedI'm looking for this too - and don't understand why this issue was closed when there doesn't seem to be an answer?
Comment #4
Phillip Mc commentedHere's a suggestion based on the ec_region.module that could be used to add charges based on State (USA) as an example.
(for ecommerce version 5.x-3.0 or 5.x-3.x-dev)
In this illustrative example, let's say I am based in California and I want to charge more to ship a parcel to New York than i would charge to Ohio.
ADD(new region) and call it Interstate Zone 1 with the realm set for SHIPPING.CONFIGUREfor your new Interstate Zone 1 region. After a few seconds the screen should populate with a list of countries and states. Select the states you want in ZONE 1 (i.e. states close to California),add new chargeand selectsimple shipping.It sounds laborious, but, I setup a shop that way for europe recently...by using the same principles...i.e. using the regions/flexicharge/address module combination to specify different postage rates for different zones, where the EU was in zone 2, Other European countries were zone 3, USA and Canade in Zone 4 and the rest of the World was Zone 5.
The same principle could be used for interstate or province based shipping charges. I notice that the address module automatically offers a list of States for USA shoppers so you can force them to put in OHIO instead of OH, but, I haven't played around with that so it might need some tweaking for a UK equivalent...for example.
For a UK equivalent of the interstate option, I suppose you could insert a new list of regions into the database manually and tweak the address.module to add in the UK region selection options. There's also some autocomplete modules out there for drupal version 5.x that might also offer some assistance on that front.
hope that helps someone.
Comment #5
csc4 commentedThanks a lot for taking the time to write this up - I'm sure it will help me.
Comment #6
brmassa commentedi think it was fixed