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.
I've created a custom page in my module through hook_menu but I can't access it in the Checkout Setting Add Pane feature. It only accepts nodes. Any suggestions?
Comments
Comment #2
sourav.konar CreditAttribution: sourav.konar as a volunteer commentedIf you use drupal commerce, you have to call hook_checkout_commerce_checkout_pane_info where you have to declare base. In your include file you should write BASE_settings_form and BASE_checkout_form. for more detail visit : http://api.drupalcommerce.org/api/Drupal%20Commerce/sites!all!modules!co... . Also please check access arguments in your hook menu so that proper permission is assigned to the concerned role.
Comment #3
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedHi,
If you use hook_menu, Have to follow ::
"access callback": A function returning TRUE if the user has access rights to this menu item, and FALSE if not. It can also be a boolean constant instead of a function, and you can also use numeric values (will be cast to boolean). Defaults to user_access() unless a value is inherited from the parent menu item; only MENU_DEFAULT_LOCAL_TASK items can inherit access callbacks. To use the user_access() default callback, you must specify the permission to check as 'access arguments' (see below).
"access arguments": An array of arguments to pass to the access callback function, with path component substitution as described above. If the access callback is inherited (see above), the access arguments will be inherited with it, unless overridden in the child menu item.
According to access arguments, hook_permissions function to implemented for page permission as souravkonar comment#2.
please follow link for hook_permissions
Regards,
Harish B
Comment #4
harish b CreditAttribution: harish b as a volunteer and at Srijan | A Material+ Company for Srijan | A Material+ Company commentedComment #5
soumyajit.basu CreditAttribution: soumyajit.basu at Srijan | A Material+ Company commented