summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcherylmae2013-07-07 01:43:07 (GMT)
committer cherylmae2013-07-07 01:43:07 (GMT)
commitc7fb9dce04945c4e09ff6d2e614f63648af59815 (patch)
treee9981b78a9bf25756491dd21aca928eba1747f36
parent69a97f3349aae31ad14177affbac63e9daec85c0 (diff)
Added Folder
Change-Id: I574ff8e93d9e721dd03afa2ae6a38de334dd2477
-rw-r--r--comerce_event_tickets.module0
-rw-r--r--commerce_event_tickets.info19
-rw-r--r--commerce_event_tickets.install49
3 files changed, 65 insertions, 3 deletions
diff --git a/comerce_event_tickets.module b/comerce_event_tickets.module
deleted file mode 100644
index e69de29..0000000
--- a/comerce_event_tickets.module
+++ /dev/null
diff --git a/commerce_event_tickets.info b/commerce_event_tickets.info
index d9c46bf..4a1ecfc 100644
--- a/commerce_event_tickets.info
+++ b/commerce_event_tickets.info
@@ -1,12 +1,25 @@
-name = Commerce Event tickets
+name = Commerce Event Tickets Field
description = A commerce event tickets that integrates with Commerce
core = 7.x
-package = Commerce Event Tickets
+project = "commerce_event_tickets"
+package = "Commerce"
dependencies[] = commerce
dependencies[] = commerce_order
dependencies[] = commerce_payment
+dependencies[] = commerce_product
+dependencies[] = commerce_product_ui
+dependencies[] = commerce_order_ui
+dependencies[] = commerce_product_pricing
+dependencies[] = commerce_line_item_ui
+dependencies[] = commerce_customer_ui
+dependencies[] = commerce_cart
+dependencies[] = commerce_checkout
dependencies[] = views
dependencies[] = entity
dependencies[] = field_collection
-dependencies[] = date \ No newline at end of file
+dependencies[] = date
+dependencies[] = field_collection_table
+dependencies[] = registration
+dependencies[] = commerce_registration
+
diff --git a/commerce_event_tickets.install b/commerce_event_tickets.install
index e69de29..67436b1 100644
--- a/commerce_event_tickets.install
+++ b/commerce_event_tickets.install
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file commerce_tickets.install
+ *
+ * Contains install and update functions for Commerce Tickets
+ */
+
+/**
+* Implements hook_install().
+*/
+function commerce_event_tickets_install() {
+ drupal_static_reset();
+ commerce_product_configure_product_types();
+
+ $product_type = commerce_product_ui_product_type_new();
+
+ $product_type['type'] = 'commerce_event_ticket';
+ $product_type['name'] = t('Commerce Event Ticket');
+ $product_type['description'] = t('A commerce event ticket product type.');
+ $product_type['is_new'] = TRUE;
+
+ commerce_product_ui_product_type_save($product_type, TRUE);
+ $reg['values']['label']='Ticket';
+ $reg['values']['name']='commerce_event_ticket';
+
+ $reg = entity_create( 'registration_type', array( 'name' => 'commerce_event_registration','label'=>'Registration' ) );
+ $reg->save();
+
+
+}
+
+/**
+* Implements hook_uninstall().
+*/
+function commerce_event_tickets_uninstall(){
+ if ($type = commerce_product_type_load('commerce_event_ticket')) {
+ commerce_product_ui_product_type_delete('commerce_event_ticket');
+ }
+ if($reg_type=entity_load('registration_type', 'commerce_event_registration')){
+ entity_delete('registration_type', 'commerce_event_registration');
+ }
+ if($instance = field_info_instance('commerce_product', $field_name, 'commerce_event_ticket')){
+ field_delete_instance($instance);
+ }
+ if($field = field_info_field('field_commerce_registration')){
+ field_delete_field('field_commerce_registration');
+ }
+}