4

I am using Commerce Kickstart 2.

There is a view that lists all of the orders. On each order, there is a dropdown menu with the options of 'Quick Edit' 'Payment' and 'Delete'. I want to add my own operation on that order to view just the list of line items plus some custom information in a view.

However, I can't seem to figure out what I need to do to add a link to this dropdown menu and then go to my view when it is chosen.

0

Add the following to your hook_menu in your module to add an operation to the dropdown pulldown of commerce orders.

$items['admin/commerce/orders/%commerce_order/<your operation>'] = array(
    'title' => 'Your Title',
    'page callback' => 'your_callback_for_the_operation',
    'page arguments' => array(3),
    'access callback' => 'your_access_callback',
    'access arguments' => array(3),
    'type' => MENU_LOCAL_TASK,
    'weight' => 30,
    'context' => MENU_CONTEXT_INLINE,
);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.