Module: Ubercart Order Node (uc_order_node)

Extends Ubercart's core Orders by linking them to a node. The node type can then be customized with CCK fields. This is helpful if you want to add extra fields (like Sales Rep, Requested Arrival Date, etc) to orders, and have access to them in the normal order admin interface.

http://drupal.org/sandbox/mstenta/1080656

Comments

avpaderno’s picture

Status: Active » Needs review
joachim’s picture

Status: Needs review » Needs work

Good idea, sounds pretty useful.

- the $Id$ line is obsolete
- the file docblock in your install file is wrong
- use sentence case not title in things like your uc_order_node_schema strings, your module info name and description, and so on.
- Line comments should usually be complete sentences:
// If the node is an order node type
- I don't really like the look of uc_order_node_edit_form... needs more explanation at the very least.
- The 'uc_order_node_type' variable forces you to keep jumping through hoops to check it's set and all that. I think this module would be perfectly justified in using hook_node_info() to define its own order node type and thus have the node type string fixed in code.

m.stenta’s picture

Status: Needs work » Needs review

Thanks for the pointers joachim, I've committed a couple of changes to address them. Changing the status of this issue back to needs review so you can take a look... (thanks again!)

Quick summary:
- Got rid of the $Id$ lines.
- Fixed the @file comments in all files.
- Added @param comment lines where necessary.
- Changed a bunch of my comments to use sentence case rather than title case.
- Made all comments into complete sentences.
- Added a bunch more comments to uc_order_node_edit_from to explain what it's doing and why.

As for your last suggestion (using hook_node_info() to define an order nodetype in code), I agree that it would reduce complexity to define the nodetype in code. I decided against doing that for two reasons: 1) I generally prefer when modules don't make that kind of assumption (just my own opinion), and 2) (more importantly) the feature was requested by another user so I made it happen (http://drupal.org/node/1080698).

ccardea’s picture

Status: Needs review » Needs work

Review Notes:

  • Licensing: no licensing issues
  • Drupal API: appears to have a good understanding of the Drupal API.
  • Security: No security issues noted.
  • Coding Style: good.
  • Documentation good.

The biggest impediment for this project appears to be considerable overlap with other modules, i.e.

  • Extra Fields Checkout Pane,
  • Ubercart Webform Checkout Pane.
  • Ubercart CCK Checkout Pane.

My search yeilded 358 results for Ubercart modules. Can you justify why the Drupal community needs this? What makes this module different from others that provide similar functionality?

m.stenta’s picture

Thanks for the review.

This module differs from the three cited in that it's purpose is to provide admins who are managing orders a way of giving more information to an order via the node type's CCK fields. When an admin is looking at an order in the Ubercart interface, they see an order pane with the node's edit form embedded, so they can change values of data. This is in contrast to the three modules above, which are all centered around allowing customers to add more information during the checkout process.

The best way to demonstrate why this is different is with a direct example. Imagine a company that has a dozen sales reps on the phone with customers, taking orders and entering them into Ubercart via the backend order admin interface. With this module, the company can define any number of customizable fields to add to the order, such as the Sales Rep's name, the date when the order should be shipped, etc. These fields are not for customer use, but they are essential to the day-to-day management of the orders in the system. And combined with the Views module (which this module provides support for) and the Views Bulk Operations module, a fully customized order management interface can be created with filters for finding orders quickly based on the node and CCK fields associated with them.

Ubercart does not have a way currently to add custom fields to an order for order management purposes. This module bridges that gap with minimal code to seamlessly integrate a node into the order interface. The node's edit form is displayed when you are on the "Edit" tab of the order, and the node's view is displayed when you're looking at the "View" tab of the order. All of it works without having to leave the page you are on, which is essential when you're on the phone with a customer taking down their information.

m.stenta’s picture

Status: Needs work » Needs review
ccardea’s picture

Status: Needs review » Reviewed & tested by the community

OK, that sounds good enough to me. I haven't installed and tested the module, but I think we can let users do that in the issue queue. I am going to pass this on to the git admin for approval.

m.stenta’s picture

Great! Thank you so much!

I am currently using this module on a site that will be going into production soon. We've been banging on it pretty hard, and it's working great thusfar.

rfay’s picture

Status: Reviewed & tested by the community » Fixed

Thanks to all for your contributions and reviews.

Git vetted user role granted. Thanks for your patience and your contributions!

Please take the time to review other applications - see http://drupal.org/node/636570

Thanks!

davident’s picture

Component: new project application » module

Is this module available yet?

m.stenta’s picture

Status: Fixed » Closed (fixed)

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