Answers.Body: <p>As of this writing event cart should be enabled but hidden, and currently still relies on the setting under Administer - CiviEvent - Component Settings to switch on and off features. You can verify if the extension is enabled by running this SQL: <code>select is_active from civicrm_extension where name='eventcart';</code></p>
  <p>If it's not, in civi go to Support - Developer - api explorer v3 and choose Entity=Extension, and Action=Enable, and for the key parameter put <code>eventcart</code>. Then click execute at the bottom. The upgrade should have done that though. There should be a record that it did that in ConfigAndLog.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-05T22:29:10.890Z
Answers.Text: There is only one extension is this table (it's my custom payment extension).
  Nothing else.
  Same result in api explorer v3.
Answers.UserDisplayName: Nicolas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-06T09:25:16.997Z
Answers.Text: Maybe can help : I can see all files of eventcart in the directory.
  So, I think it's installed but not enabled.
  
  Other info, it seems there are 2 different directories for extensions : 
  
      in plugin core : wp-content/plugins/civicrm/civicrm/ext/
      and in upload dir : wp-content/uploads/civicrm/
  
  In 1st one, there is eventcart extension and others.
  In the second one, I have my custom payment extension.
Answers.UserDisplayName: Nicolas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-05T20:28:54.620Z
Answers.LastActivityDate: 2020-11-05T20:28:54.620Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>I found the solution. The reason was very simple.
  In my settings file located in WordPress upload files, I set :
  <code>$civicrm_root = dirname(__FILE__).'/../../plugins/civicrm/civicrm/';</code></p>
  <p>I change it into absolute real path :
  <code>$civicrm_root = /var/www/html/mysite/html/wp-content/plugins/civicrm/civicrm/';</code></p>
  <p>After that, I was able to enable the extension &quot;eventcart&quot; with api explorer v3.
  It seems the &quot;../&quot; is not allowed by civi in last version.</p>
  <p>Nicolas</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-10T10:49:50.557Z
Answers.LastActivityDate: 2020-11-10T10:49:50.557Z
Answers.UserDisplayName: Nicolas
Body: <p>after an update of wp civicrm plugin from 5.16.4 to 5.30.1. (WordPress is also up to date).
  When I subscribe to an event this fatal error appear :
  PHP message: PHP Fatal error:  Uncaught Error: Class 'CRM_Event_Cart_BAO_Conference' not found in civicrm/CRM/Event/BAO/Event.php:1133</p>
  <p>File : &quot;civicrm/CRM/Event/BAO/Event.php:1133&quot;</p>
  <p><code>$sessions = CRM_Event_Cart_BAO_Conference::get_participant_sessions($participantId);</code></p>
  <p>Maybe the problem is due to a wrong setting ?
  I kept my old civicrm.settings.php as it is after update.</p>
  <p>It seems eventcart extension is not installed or activated.
  I mean this extension : wp-content/plugins/civicrm/civicrm/ext/eventcart/</p>
  <p>Do you know how install/enable it?</p>
  <p>Thank you for you help.
  Nicolas</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-05T20:35:37.180Z
Comments.Text: Just a thought - there are other approaches available to paying for multiple events, especially if those events are part of a Series for example - just in case there is a better solution now than event cart
Comments.UserDisplayName: petednz - fuzion
Tags: <wordpress><civievent><extension><modules>
Title: How enable eventcart extension in WordPress CiviCRM?
ThreadText: # How enable eventcart extension in WordPress CiviCRM?
  
  (Asked by: username_0 on 2020-11-05)
  
  after an update of wp civicrm plugin from 5.16.4 to 5.30.1. (WordPress is also up to date).
  When I subscribe to an event this fatal error appear :
  PHP message: PHP Fatal error: Uncaught Error: Class 'CRM\_Event\_Cart\_BAO\_Conference' not found in civicrm/CRM/Event/BAO/Event.php:1133
  
  File : "civicrm/CRM/Event/BAO/Event.php:1133"
  
  `$sessions = CRM_Event_Cart_BAO_Conference::get_participant_sessions($participantId);`
  
  Maybe the problem is due to a wrong setting ?
  I kept my old civicrm.settings.php as it is after update.
  
  It seems eventcart extension is not installed or activated.
  I mean this extension : wp-content/plugins/civicrm/civicrm/ext/eventcart/
  
  Do you know how install/enable it?
  
  Thank you for you help.
  username_0
  
  **Tags:** wordpress, civievent, extension, modules
  
  > **Comments:**
  > **username_1**: Just a thought - there are other approaches available to paying for multiple events, especially if those events are part of a Series for example - just in case there is a better solution now than event cart  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-11-05. Score: 3
  
  As of this writing event cart should be enabled but hidden, and currently still relies on the setting under Administer - CiviEvent - Component Settings to switch on and off features. You can verify if the extension is enabled by running this SQL: `select is_active from civicrm_extension where name='eventcart';`
  
  If it's not, in civi go to Support - Developer - api explorer v3 and choose Entity=Extension, and Action=Enable, and for the key parameter put `eventcart`. Then click execute at the bottom. The upgrade should have done that though. There should be a record that it did that in ConfigAndLog.
  
  > **Comments:**
  > **username_0**: There is only one extension is this table (it's my custom payment extension). Nothing else. Same result in api explorer v3.  
  > **username_0**: Maybe can help : I can see all files of eventcart in the directory. So, I think it's installed but not enabled.  Other info, it seems there are 2 different directories for extensions :       in plugin core : wp-content/plugins/civicrm/civicrm/ext/     and in upload dir : wp-content/uploads/civicrm/  In 1st one, there is eventcart extension and others. In the second one, I have my custom payment extension.  
  
  ---
  
  ### Answer by username_0 on 2020-11-10. Score: 1
  
  I found the solution. The reason was very simple.
  In my settings file located in WordPress upload files, I set :
  `$civicrm_root = dirname(__FILE__).'/../../plugins/civicrm/civicrm/';`
  
  I change it into absolute real path :
  `$civicrm_root = /var/www/html/mysite/html/wp-content/plugins/civicrm/civicrm/';`
  
  After that, I was able to enable the extension "eventcart" with api explorer v3.
  It seems the "../" is not allowed by civi in last version.
  
  username_0
  
  
  ---
  
  