Tags/topics: 
1
Answers
Vote up!
2
Vote down!

Is it possible for Drupal Commerce to work without the Cart Module?

I have a strict form process for customers that I tailored, but I'm having issues looking to remove the cart functionality. It seems that core functionality for Drupal Commerce is completely lost when disabling Drupal Commerce Cart. Is this a mistake? I tested this by trying to create custom orders in the administration screen and was unable to. Am i missing something? How can I debug this?

Asked by: dannymacom
on June 12, 2012

Comments

I think you are misunderstanding how the Commerce module works. The cart module is technically a separate module, but it is essential to the functionality of Drupal Commerce. I think you would be better off trying to customize Commerce to meet your needs rather than trying to recreate it yourself.

- patmac on June 14, 2012

1 Answer

Vote up!
3
Vote down!

I think where it was confusing is that I was able to disable Commerce Cart without having to disable other modules -- the unintended consequences of this is that my site no longer worked. Renabling Commerce Cart brought the site back up. In order for me to disable Commerce Cart (specifically for non-admin users) I did hook_menu_alter to add access arguments so that non admins could not view the cart. I believe setting the Commerce Cart module to being required by the rest of Commerce Core would be less confusing. My code is listed below:

function hook_menu_alter(&$items) {

$items['cart']['access arguments'] = array('administer checkout');
$items['cart/my']['access arguments'] = array('administer checkout');

}

Answer by: dannymacom
Posted: Jun 16, 2012