Hi all,
I‘m currently moving our old site to drupal 4.7 w/ ecommerce. Beta will be up soon. We mainly sell our stuff to business customers in Europe.
Enclosed you‘ll find a patch for the address module with following modifications:
- Re-arranged fields
- Added company field
- Added vat id field (is needed for intra EU sales)
- Vat id field is only shown when country is one of EU 25
- Set province/region to optional
- Added address_detail_view function which is called from address_checkoutapi case 'review'
Comments:
ad 1: Personal preference (Should be changeable via settings in the future)
ad 3: I put the vat id field into ec_address because the id is bound to the company and location.
ad 6: Needed for reliable tax calculations and exempts. User should not be able to change address via popup at this stage
DB modifications:
ALTER TABLE `ec_address` ADD `company` VARCHAR(216) NOT NULL AFTER `lastname`, ADD `vatid` VARCHAR(24) NOT NULL AFTER `company`;
Todo:
Future versions of the tax module can use the vatid fields from ec_address.
This is my first input, please review carefully.
Thank you all for the good stuff
Kurt
| Comment | File | Size | Author |
|---|---|---|---|
| address_w_company_vatid.patch | 7.49 KB | kje |
Comments
Comment #1
matt westgate commentedWhat the address module really needs to do is find a way to use profile modules fields rather than creating its own. Once we successfully harness the power of profile module, adding 'company' or 'vatid' become trivial.
Comment #2
arthurf commentedIf you want to support this with non-logged in users, you also need to modify store.inc to output these fields.
I added to lines 226/227
Comment #3
fgmReclassified: uses the 4.6 API.
Comment #4
simeI'll look to cover this in upcoming work.
Comment #5
simePlanned for v4
http://groups.drupal.org/node/2853
Comment #6
(not verified) commented