Jeremy Andrews is working for CivicSpace on upgrading and refactoring the shipcalc module. It needs to be updated to 4.7. He's also looking at refactoring it, removing the AaronUPS class and instead enabling either parallel classes as available through osCommerce or Zencart or else custom Drupal implementations.

Comments

sime’s picture

Ticket that may contain useful information.
http://drupal.org/node/50662

jeremy’s picture

StatusFileSize
new88.56 KB

This patch requires that Nedjo's shippingapi patch be applied first.

This patch is not complete, but provides enough functionality that it would be great to get some reviews. It is basically a complete rewrite of shipcalc, aiming to provide much better support for third-party shipping partners (UPS, USPS, FedEx, etc...). When complete, adding a new shipping partner should be as simple as creating a new partners/partner_name.inc file, with shipcalc doing all the shippingapi work. Developers documentation is still forthcoming, however the code is heavily commented so it should be easy enough to understand what's going on by glancing through the code.

Currently the UPS api is the only one implemented, and it is only partially implemented. There is still some work being done on the shippingapi necessary to complete the shipcalc work.

TODO:

  • the checkout process is not complete, still needs to validate/save shipping selections, and properly display the seleceted choice
  • implement method for specifying/selecting one or more ship-from addresses
  • international support
  • finish ups.inc implementation
    • add shipping method descriptions
    • finish administrative testing functionality
    • utilize as-of-yet-uncreated source-address functionality (currently hard coded to my home address for testing)
    • add ability to specify packaging type (affects cost of shipping)
jeremy’s picture

StatusFileSize
new190.94 KB

This patch requires that Nedjo's shippingapi patch be applied first.

I've updated the shipcalc patch, it is now functional with UPS. There's still more on the TODO list (included in the patch now), but it's ready for testing and reviews.

Changes:

  • finished checkout process
  • utilizes one or more fulfillment centers for ship-from address
jeremy’s picture

StatusFileSize
new11.38 KB

For anyone that is afraid of patches, you can just replace the old contrib/shipcalc directory with the contents of the attached tarball.

nedjo’s picture

This is looking very good.

I'll work on pulling some of the checkoutapi logic from here to shipping.module so we can pool shipping methods or options on one screen.

We might also want to think about moving the fulfillment centre piece there as well, since more than one shipping method might define need fulfillment centres (and more than one method, defined by different modules, might share a given fulfillment centre). I'll look at what this would involve.

All in all I think we're making great progress.

recidive’s picture

Good work!

What do you think of make use of templates for generating UPS webservice requests data? This can reduce the manipulation of big strings in PHP. See _phptemplate_default() in themes/engines/phptemplate/phptemplate.engine. Also, I think this is a feature that can be implemented as a ecommerce core feature, so we'll be able to use this in other shipcalc modules and in other ecommerce modules like payments.

jeremy’s picture

StatusFileSize
new90.85 KB

Here's the latest version of the shipcalc patch. Some functionality was removed, and moved into the core shipping module patch so that all shippingapi modules can benefit. To use the attached shipcalc patch, you must first apply the formentioned shipping module patch.

gordon’s picture

Status: Active » Fixed

Thanks this is great, commited to cvs.

There maybe still some issues, but I need this tested.

I would like to test this more, but my ups key is not working, so if you can email me a key, it would be most appreciated.

Anonymous’s picture

Status: Fixed » Closed (fixed)