/[drupal]/contributions/modules/uc_edi/uc_edi.install
ViewVC logotype

Contents of /contributions/modules/uc_edi/uc_edi.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Thu May 22 19:16:54 2008 UTC (18 months ago) by rszrama
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5
File MIME type: text/x-php
Initial upload of the Ubercart EDI module.  Allows for exporting orders on a cron run according to a set pattern.  These files are then passed onto a fulfillment house for orders to be shipped.  Can also process receipt files to act on orders once the fulfillment house has processed them.
1 <?php
2 // $Id$
3
4 function uc_edi_install(){
5 $t = get_t();
6
7 switch($GLOBALS['db_type']){
8 case 'mysql':
9 case 'mysqli':
10 db_query("INSERT INTO {uc_order_statuses} (order_status_id, title, state, weight, locked) VALUES "
11 ."('edi_export', '". $t('Order processed') ."', 'edi_processing', 15, 1),"
12 ."('edi_pending', '". $t('Shipment pending') ."', 'edi_processing', 16, 1);");
13 break;
14 case 'pgsql':
15 db_query("INSERT INTO {uc_order_statuses} (order_status_id, title, state, weight, locked) VALUES "
16 ."('edi_export', '". $t('Order processed') ."', 'edi_processing', 15, 1),"
17 ."('edi_pending', '". $t('Shipment pending') ."', 'edi_processing', 16, 1);");
18 break;
19 }
20 }
21
22 function uc_edi_uninstall() {
23 variable_del('uc_edi_order_import_dir');
24 variable_del('uc_edi_order_archive_dir');
25 variable_del('uc_edi_order_import_extension');
26 variable_del('uc_edi_order_import_freq');
27 variable_del('uc_edi_imported_order_status');
28 variable_del('uc_edi_order_export_dir');
29 variable_del('uc_edi_order_export_extension');
30 variable_del('uc_edi_order_export_freq');
31 variable_del('uc_edi_export_order_status');
32 variable_del('uc_edi_exported_order_status');
33 }
34

  ViewVC Help
Powered by ViewVC 1.1.2