This looks like a really promising module. However, I found a number of issues when testing it and have attached a patch to address the following:

  • Coding style changes - Drupal uses 2 space indentation, and no tabs. The indentation was all over the place making it hard to read, so I fixed this in the majority of files I believe. I also started tidying up the comments, but haven't completed this task.
  • Namespacing - the module name on d.o is commerce_shipping_matrix, yet shipping_matrix was used in the filenames and function names throughout. This is now fixed.
  • I couldn't find any of the configuration pages through the menu navigation structure, so I've added them to the menu and declared MENU_LOCAL_ACTIONs where needed too
  • I hit various errors in checkout and when configuring the shipping service/zones etc. Some seem partially due to changes in addressfield since this code was written
  • There was a reliance on the language code 'und' which won't work on multilingual sites, so I've added a dependency on the entity module and am now using entity_metadata_wrapper to query the values on an entity field.

Comments

stella created an issue. See original summary.

stella’s picture

Patch reroll to fix some additional undefined variable warnings.

stella’s picture

stella’s picture

Patch reroll to add a new "catchall zone" flag - scenario is you ship worldwide, and divide the countries into 4 zones plus "Rest of the World". This flag/checkbox provides a quick way to configure a catchall zone rather than configuring all 200+ countries.

rbosscher’s picture

Wow! Awesome job!

Everything looks nice and clean now!
I've committed the patch to a new branch.
So we can build further from there.

Sorry it took so long to commit.

While testing, on a clean commerce kickstart profile, installing did not went smoothly.
Reinstalling fixed the issues I encountered, I think if we fix the installing issues we could apply to get this module out of the sandbox.

Again thanks Stella!

rbosscher’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.