The uc_event module is more or less complete. Many thanks to Amber Eyes Solutions (www.ambereyes.net) who have kindly taken over sponsorship of it.
The following is taken from the README.txt:
INSTALL
uc_event is a product created from outside of Ubercart and has to be seen as a product from within the script.
To get this module to validate for entry into the shopping cart requires doing either of two things.
1. Modiying uc_cart at line 1851 as follows:
Replace:
if (!in_array($node->type, module_invoke_all('product_types'))) {
drupal_set_message(t('!title is not a product. Unable to add to cart.', array('!title' => $node->title)), 'error');
return;
}
With
if (!in_array($node->type, module_invoke_all('product_types')) && !isset($node->sell_price)) {
drupal_set_message(t('!title is not a product. Unable to add to cart.', array('!title' => $node->title)), 'error');
return;
}
Or using patch notation
- if (!in_array($node->type, module_invoke_all('product_types'))) {
+ if (!in_array($node->type, module_invoke_all('product_types')) && !isset($node->sell_price)) {
drupal_set_message(t('!title is not a product. Unable to add to cart.', array('!title' => $node->title)), 'error');
return;
}
2. Running the install programme and putting up with a dud content type. You will need edit uc_event.install and uncomment the required line before doing so.
OPERATION
Settings:
The event content type is set by default. To enable other content types go to admin/settings/uc_event. Note that this is designed for event nodes but any node can be turned into a product, however there are only restricted fields available and the intention of the module is to use only with events.
Paid Events:
uc_event is operated from within the node. When you create/edit the node, there is an option to turn it into a paid event. If you do so, click submit and then go in and edit again, the necessary product items will be displayed in the form and a product will be created as well as the event (one node registering as both)
Works for repeat events as well.
-----------------------------------------------------------------------------------------------------------------
My preferred option is option 1 since option 2 results in the creation of a dud content type which appears everywhere. If the Ubercart developers accept this module they may change the uc_product script so that this module does not require such modifications.
| Attachment | Size |
|---|---|
| uc_event.zip | 4.69 KB |

Joined: 03/22/2008