Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Order
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2010 at 12:53 UTC
Updated:
19 Nov 2010 at 02:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedFirst shot at this.
What's missing is deciding what to do in places we currently hardcode the
'commerce_order'bundle (especially in the checkout process...).Comment #2
rszrama commentedYeah, the question of "default" order type is a very important one. That can just be a shopping cart setting if necessary. The problem with no UI is that there is an order settings page where users can manage fields on orders. It would seem silly to introduce API level support to have multiple order types but not design the default UI to support modules adding order types.
I think it makes good sense for us to have core support in the sense that if multiple modules need to plugin to this, there's no reason for them each to enable bundling orders. I left it as no bundling for 1.0 for simplicity's sake (there was plenty else to worry about), but if we're going to change it, I'd just as soon go the full way as half an introduce a UI like the customer profile / line item type management interfaces with some way to specify the order type Cart should use with an order type selection screen for creating orders from the backend.
Comment #3
damien tournoud commentedWhat I meant by "API-level" was that I don't believe there is a need for storing order types in the database.
Field UI for order is debatable. I would be happy with just the UI for default order type, with other UI added in by the additional modules.
Comment #4
rszrama commentedI got your meaning - it's the same way it works for customer profile / line item types. They can only be module defined w/ no database storage support. We could have a "smart" UI that degrades to the single menu item when only one order type is available. : ?
Comment #5
rszrama commentedOk, Damien and I talked about this a bit further in IRC. Without going the full 9 yards and adding extra permissions, a UI to select default order type, UI to manage fields on different order types, we figured the minimum work would be to get the order type in the database. I committed a variation of Damien's patch with support for setting the type on order creation via the controller.
Part of me feels like we made a mistake here, walking back from a full on hook to just depending on altering the entity info array. However, if we're not going to provide a full implementation of order types, it "feels" right to not really define order types to the level of product types, line item types, etc.
I'm happy to be told otherwise (especially if I misunderstood you, Damien). : )
Commit: https://github.com/rszrama/drupalcommerce/commit/639dc150e8b76a435e0858a...