Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
How about a hook for adding some description text at the bottom of the box?
I am creating a plugin module for Coffee called Commerce Coffee, that enables sellers to:
- Quickly navigate trough commerce
- Find latest order by entering email
- Setting commonly used search criterias for views by using Coffee
Having a hook like that would enable it to add a command quicklist to the box.
Comments
Comment #1
lsolesen CreditAttribution: lsolesen commentedThat would be a great idea, so the user would instantly know which commands to use.
@farald How is the development going - any public code, and do you plan on releasing on d.o.?
Comment #2
farald CreditAttribution: farald commentedHey, thought is to get a sandbox up & running with it, and eventually a module.
The code is pretty basic, it hooks in using
hook_coffee_command
, code below.To look for users & user's orders:
:u buyer@email.com or :u username
Look for sku:
:sku BOOK_1
Look for orders:
:o 19
..and links magically shows up.
My utopia is a hook, in which I can write:
Personally I think this would be best implemented as showing only when the input field is empty (or maybe only containing the ':'), and hiding itself once user starts entering.
When administering Commerce a lot, this feels more or less like having a Drush inside Drupal. And that's awesome :)
EDIT: Temp sandbox for Commerce Coffee is now here: http://drupal.org/sandbox/farald/1457938
Comment #3
michaelmol CreditAttribution: michaelmol commentedI like the idea and I think a list of possible command should show when ':' is typed.
Comment #4
michaelmol CreditAttribution: michaelmol commentedComment #5
maartenverbaarschot CreditAttribution: maartenverbaarschot commentedSounds like we could bring
:help
back from the dead. (Similar to typing drush help)Comment #6
lsolesen CreditAttribution: lsolesen commented@micahelmol a good idea with some hints when : is typed. Maybe starting with a short message explaining that the user can type : to get the possible commands.
@maartenverbaarschot :help would also be a good idea :)
Comment #7
michaelmol CreditAttribution: michaelmol commented:help
sounds like an ideal candidateComment #8
maartenverbaarschot CreditAttribution: maartenverbaarschot commentedComment #9
farald CreditAttribution: farald commentedRe @Isolesen #1: Commerce Coffee is now a full project.