Closed (fixed)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Contributed modules
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2010 at 16:32 UTC
Updated:
24 Sep 2017 at 09:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rszrama commentedMy ideal solution would involve getting the Comment module to work on entities other than Node. Your approach can work, but you're going to need to create your own checkout pane that can populate that field with whatever value the customer enters during checkout.
Comment #2
pieterdcYou would like the comment module because customer and merchant could then keep commenting on an order.
And we could then use an existing comment-notify module to well.. I see.
That would require the comment module as you mention, to be node-independent.
We could support #731724: Convert comment settings into a field to make them work with CMI and non-node entities
But that doesn't solve the fact that the current 'Manage fields' tab of the order; admin/commerce/config/order/fields has unclear consequences.
Adding a field doesn't expose it to the customer ( / author, for input).
Which makes it hard to grasp.
Should we use something like http://drupal.org/project/field_group and expose every order field_group as a checkout pane?
Store admins could then put those fields somewhere in the checkout flow, via admin/commerce/config/checkout/form
That would be dynamic, I guess.
Comment #3
rszrama commentedSo, I think it'd be very cool to be able to add fields to orders and automatically get corresponding checkout panes, but I don't think we'll be supporting that in core for now. It's just a hunch, but that feels like more than our stated goal of a somewhat minimalism... but it should be easy for a module to expose a UI to do that. I'm already doing this with the customer profile reference field in a sense. The problem with some fields is that you just need to get some hard logic involved that requires code, but for simple fields like textfields and select lists, I bet it would be a great way for people to add things to the checkout form.
Yeah, that sounds like a contributed module that needs to happen... I'm sure I'll get to it if no one else does first. : D
Comment #4
pieterdcOk, thinking about core functionality.
As the line-item manager is (currently the only) field of an order, and appears on the cart page (for input), it would make sense for every other order field (added on the 'manage fields' page of 'order') to also appear on that page (for input), doesn't it?
Comment #5
pieterdcJust made a custom module that fits my needs.
I requires you to firstly manually add a field_order_message_author and a field_order_message field to the list of order fields.
Just sharing...
Comment #6
rszrama commentedOne observation, Peter - you could use the Field CRUD API to create the fields. That's what we're doing throughout Commerce for things like default price fields and reference fields.
Comment #7
pcambraThanks PieterDC, I've used your module as base for http://drupal.org/project/commerce_order_comment
Comment #8
WilliamV commentedI will use this module as well. Thank you for the contribution.
Comment #9
pieterdcThanks for continuing this work, pcambra.
Comment #10
WilliamV commentedI filtered out the author field as i think this isn't required for my project.
Your module gives the possibility to create 'custom field-panes' by changing field types and formats.
I would like to create a 'collect-date-pane' wheras a user can enter a date and time ('date'-fields with popup) for collecting his order as none of the orders are shipped. The date-modules would be required for the field right?
I only have a lack of programming knowledge, so, anyone can help resolving my problem?
I've created a new issue as well as this doesn't belong here (it is based upon the creation of the same principals though).
Grtz & Thx!
Comment #11
hunziker commentedI have created module mentioned in post #3.
You can create a new field group for the order entity and then a corresponding pane is available. The project can be found here:
Commerce Fieldgroup Panes
The latest commit should be already full functional.
For the comment module it would be nice, if we can create something more flexible. Such that we can have multiple comments per order and have different visibilities (per role).
Comment #12
rszrama commentedOooh! Very cool. Excited to check this one out. : D
Comment #13
hunziker commentedI add the review pane callback. The module is only about 100 lines of code. So there is only small chance that a bug is remain in it. So I add a first release candidate.
Next nice feature would be the possibility to control the activation of a pane by rules. Is such functionality a part of the core or should this implemented by a contribution?
Comment #14
pcambraNice one hunziker, do you think we should mark commerce order comment as obsolete and redirect people to yours?
Comment #15
hunziker commentedThe problem is that for comments we need something different to my approach. Currently the comment module does the same as I do. So it is obsolete, but normally the administrator wants to add memos, send directly comments to the customer and so on. Therefore we need a comment module. My approach can only add fields of the order entity to the checkout process, but not complete new entities like "comments".
Comment #17
ahimsauzihunziker, is that mean that adding a not to the admin field via rules is not possible at this time? I am looking for a solution that will add a not to any of the fields if certain conditions exist (UC conditional actions hello?).
Comment #18
murzAlso we can use Reply module for creating comments into order entity.
Comment #19
stijnbousard commentedPost #11 using the Commerce Fieldgroup Panes module is the way I used to add a comment field to an order.
Works like a charm.
The usage is clearly explained in the following vimeo:
https://commerceguys.com/blog/commerce-module-tuesday-commerce-fieldgrou...
Thanks!