Discussions

Disabling a checkout page

There is no "enabled" property for hook_commerce_checkout_page_info(). This property is available in hook_commerce_checkout_pane_info() but not page.

I'm trying to work on my first module for Commerce (actually, my first module period) which will require commerce_shipping. I intend it to be a simple Pickup or Delivery radio button pane on the checkout page that when enabled will default to Pickup. I want it to disable the shipping address pane and the shipping page.

Does this need to be entered as a feature request?

Thanks,
Pete

Posted: Jun 3, 2012

Comments

switch on June 14, 2012

I initially was asking around IRC why commerce_checkout_page_info didn't have an 'enabled' property but I was told by Saisai that if there is no pane on a page that page will be skipped…not sure if that means if the pane is disabled or removed.

Anyone have any thoughts?

akosipax on March 7, 2013

well, disabling didn't do it. you have to remove it. I removed it by unsetting it like

unset($panes['commerce_shipping']);

edit: i have to clarify, disabling it via pane_info_alter didn't do it. But if you move the pane in the disabled area in the checkout settings, the page will be skipped. you don't have to unset $panes['commerce_shipping']

golubovicm on January 21, 2014

I'm also trying to remove page from checkout process, but even if I left page without any pane it's still displayed. I can't believe that there is no simple way to add/remove checkout page?!?