403Webshell
Server IP : 138.197.176.125  /  Your IP : 216.73.217.122
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux SuiteCRM-8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.3.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/suitesupport.varianceinfotech.net/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/suitesupport.varianceinfotech.net/Add_New_Fields_Customer_Order_Module.php
<?php

$Vtiger_Utils_Log = true;

include_once('vtlib/Vtiger/Module.php');

$moduleInstance = new Vtiger_Module();
$moduleInstance->name = "CustomerOrder";
$moduleInstance = $moduleInstance->getInstance('CustomerOrder');

$blockInstance = new Vtiger_Block();
$blockInstance->label = "Customer Order Information";
$blockInstance = $blockInstance->getInstance($blockInstance->label, $moduleInstance);

/*$fieldInstance1 = new Vtiger_Field();
$fieldInstance1->name = "customer_email";
$fieldInstance1->label = "Customer Email";
$fieldInstance1->table = $moduleInstance->basetable;
$fieldInstance1->coulmn = "customer_email";
$fieldInstance1->coulmntype = "VARCHAR(255)";
$fieldInstance1->uitype = 13;
$fieldInstance1->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance1);

$fieldInstance2 = new Vtiger_Field();
$fieldInstance2->name = 'subscription_expire_date';
$fieldInstance2->label = 'Subscription Expire Date';
$fieldInstance2->table = $module->basetable;
$fieldInstance2->column = 'subscription_expire_date';
$fieldInstance2->columntype = 'DATE';
$fieldInstance2->uitype = 5;
$fieldInstance2->typeofdata = 'D~O'; 
$blockInstance->addField($fieldInstance2);

$fieldInstance3 = new Vtiger_Field();
$fieldInstance3->name = 'trial_start_date';
$fieldInstance3->label = 'Trial Start Date';
$fieldInstance3->table = $module->basetable;
$fieldInstance3->column = 'trial_start_date';
$fieldInstance3->columntype = 'DATE';
$fieldInstance3->uitype = 5;
$fieldInstance3->typeofdata = 'D~O'; 
$blockInstance->addField($fieldInstance3);

$fieldInstance4 = new Vtiger_Field();
$fieldInstance4->name = "product_currency";
$fieldInstance4->label = "Product Currency";
$fieldInstance4->table = $module->basetable;
$fieldInstance4->coulmn = "product_currency";
$fieldInstance4->coulmntype = "VARCHAR(255)";
$fieldInstance4->uitype = 15;
$fieldInstance4->setPicklistValues(Array('USD', 'INR'));
$fieldInstance4->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance4);

$fieldInstance5 = new Vtiger_Field();
$fieldInstance5->name = "order_type";
$fieldInstance5->label = "Order Type";
$fieldInstance5->table = $module->basetable;
$fieldInstance5->coulmn = "order_type";
$fieldInstance5->coulmntype = "VARCHAR(255)";
$fieldInstance5->uitype = 15;
$fieldInstance5->setPicklistValues(Array('Manual Order', 'Automatic Order'));
$fieldInstance5->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance5);

$fieldInstance6 = new Vtiger_Field();
$fieldInstance6->name = "order_source";
$fieldInstance6->label = "Order Source";
$fieldInstance6->table = $module->basetable;
$fieldInstance6->coulmn = "order_source";
$fieldInstance6->coulmntype = "VARCHAR(255)";
$fieldInstance6->uitype = 15;
$fieldInstance6->setPicklistValues(Array('AppShor Store', 'SuiteCRM Store'));
$fieldInstance6->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance6);

$fieldInstance7  = new Vtiger_Field();
$fieldInstance7->name = 'order_domain';
$fieldInstance7->label= 'Order Domain';
$fieldInstance7->uitype= 17;
$fieldInstance7->displaytype= 1;
$fieldInstance7->table= $module->basetable;
$fieldInstance7->column = 'order_domain';
$fieldInstance7->columntype = 'VARCHAR(255)';
$fieldInstance7->typeofdata = 'V~O';
$blockInstance->addField($fieldInstance7);

$fieldInstance8 = new Vtiger_Field();
$fieldInstance8->name = 'order_subscription_id';
$fieldInstance8->label = 'Subscription Id';
$fieldInstance8->table = $module->basetable;
$fieldInstance8->column = 'order_subscription_id';
$fieldInstance8->columntype = 'VARCHAR(255)';
$fieldInstance8->uitype = 2;
$fieldInstance8->typeofdata = 'V~O'; 
$blockInstance->addField($fieldInstance8);

$fieldInstance9 = new Vtiger_Field();
$fieldInstance9->name = 'order_license_key';
$fieldInstance9->label = 'License Key';
$fieldInstance9->table = $module->basetable;
$fieldInstance9->column = 'order_license_key';
$fieldInstance9->columntype = 'VARCHAR(255)';
$fieldInstance9->uitype = 2;
$fieldInstance9->typeofdata = 'V~O'; 
$blockInstance->addField($fieldInstance9);

$fieldInstance10 = new Vtiger_Field();
$fieldInstance10->name = 'order_discount';
$fieldInstance10->label = 'Order Discount';
$fieldInstance10->table = $module->basetable;
$fieldInstance10->column = 'order_discount';
$fieldInstance10->columntype = 'decimal(13,2)';
$fieldInstance10->uitype = 71;
$fieldInstance10->typeofdata = 'N~O'; 
$blockInstance->addField($fieldInstance10);*/

$fieldInstance11 = new Vtiger_Field();
$fieldInstance11->name = 'trial_cancellation_reason';
$fieldInstance11->label = 'Trial Cancellation Reason';
$fieldInstance11->table = $module->basetable;
$fieldInstance11->column = 'trial_cancellation_reason';
$fieldInstance11->columntype = 'TEXT';
$fieldInstance11->uitype = 19;
$fieldInstance11->typeofdata = 'T~O'; 
$blockInstance->addField($fieldInstance11);


?>

Youez - 2016 - github.com/yon3zu
LinuXploit