Loading commerce_user_points.install +45 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,48 @@ function commerce_user_points_uninstall() { $content_type = \Drupal::entityTypeManager()->getStorage('node_type')->load('user_points'); $content_type->delete(); } /** * Implements hook_schema(). */ function commerce_user_points_schema() { $schema['user_points_referral'] = [ 'description' => 'The base table for managing to refer and earn.', 'fields' => [ 'id' => [ 'description' => 'The primary identifier for referral', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ], 'uid' => [ 'description' => '', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'referral_link_code' => [ 'description' => 'Referral link', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ], 'timestamp' => [ 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => "Timestamp", ], 'status' => [ 'description' => 'Active/Deactive', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ], ], 'primary key' => ['id'], ]; return $schema; } No newline at end of file commerce_user_points.libraries.yml 0 → 100755 +3 −0 Original line number Diff line number Diff line referral_link_library: js: js/custom.js: {} commerce_user_points.links.task.yml +10 −0 Original line number Diff line number Diff line Loading @@ -7,3 +7,13 @@ commerce_user_points.admin_threshold_amount_settings: title: 'Threshold Amount Configuration' route_name: commerce_user_points.admin_threshold_amount_settings base_route: commerce_user_points.admin_settings commerce_user_points.admin_referral_settings: title: 'Referral Points Configuration' route_name: commerce_user_points.admin_referral_settings base_route: commerce_user_points.admin_settings referral.link: route_name: referral.link title: 'Referral url' base_route: entity.node.canonical No newline at end of file commerce_user_points.services.yml +3 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,6 @@ services: arguments: ['@entity_type.manager'] tags: - { name: event_subscriber } commerce_user_points.referral_link: class: Drupal\commerce_user_points\ReferralLinkService No newline at end of file config/install/commerce_user_referral_points.settings.yml 0 → 100755 +2 −0 Original line number Diff line number Diff line sender_referral_points: '50' new_user_referral_points: '50' Loading
commerce_user_points.install +45 −0 Original line number Diff line number Diff line Loading @@ -14,3 +14,48 @@ function commerce_user_points_uninstall() { $content_type = \Drupal::entityTypeManager()->getStorage('node_type')->load('user_points'); $content_type->delete(); } /** * Implements hook_schema(). */ function commerce_user_points_schema() { $schema['user_points_referral'] = [ 'description' => 'The base table for managing to refer and earn.', 'fields' => [ 'id' => [ 'description' => 'The primary identifier for referral', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE, ], 'uid' => [ 'description' => '', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], 'referral_link_code' => [ 'description' => 'Referral link', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ], 'timestamp' => [ 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'description' => "Timestamp", ], 'status' => [ 'description' => 'Active/Deactive', 'type' => 'varchar', 'length' => 255, 'not null' => TRUE, ], ], 'primary key' => ['id'], ]; return $schema; } No newline at end of file
commerce_user_points.libraries.yml 0 → 100755 +3 −0 Original line number Diff line number Diff line referral_link_library: js: js/custom.js: {}
commerce_user_points.links.task.yml +10 −0 Original line number Diff line number Diff line Loading @@ -7,3 +7,13 @@ commerce_user_points.admin_threshold_amount_settings: title: 'Threshold Amount Configuration' route_name: commerce_user_points.admin_threshold_amount_settings base_route: commerce_user_points.admin_settings commerce_user_points.admin_referral_settings: title: 'Referral Points Configuration' route_name: commerce_user_points.admin_referral_settings base_route: commerce_user_points.admin_settings referral.link: route_name: referral.link title: 'Referral url' base_route: entity.node.canonical No newline at end of file
commerce_user_points.services.yml +3 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,6 @@ services: arguments: ['@entity_type.manager'] tags: - { name: event_subscriber } commerce_user_points.referral_link: class: Drupal\commerce_user_points\ReferralLinkService No newline at end of file
config/install/commerce_user_referral_points.settings.yml 0 → 100755 +2 −0 Original line number Diff line number Diff line sender_referral_points: '50' new_user_referral_points: '50'