today i've been working on a simple uc module for defining shipping rates per country. i've totally ripped off the taxes module and bent it to my evil will. i'm a frontend developer, so i was a bit scared to touch too much of the module code. i've basically just changed variable names and made the final calculation a simple addition (subtotal + shipping) instead of a percentage, but that's it.
it works!
it allows me to define a single shipping rate depending on the delivery location. i've only tested it for 'country' so far, but it probably works for 'postal code' and 'zone', too - i'll test that next.
i could stop there and delete the rest of the taxes features that i'm not using, but it would be nice to take it a bit further and make as useful as possible. does anyone have any suggestions about how the taxes features could be reused for such a module?
the first step in the 'add shipping rate rule (add tax rule)' process is the same as for taxes. administrators fill in a name and select the scope of the rule (postal code/ zone/ country).
the second step is where i'm having trouble. the tax module has the following input elements:
- rate (i've kept this, but users define the cost of postage);
- empty line;
- shipping rate;
- cumulative;
- weight;
- custom conditions.
would any of these be applicable to a 'define shipping cost per geographical location' module as i've described?




Joined: 08/08/2007