Mobile Application
Website Development
                                                                        Graphics Design
                                                                        E-Commerce
                  INSTALLATION GUIDE OF POS MODULE
Steps to Install POS Module:-
1) Create a new folder named 'img' in admin folder and give '777' permission.
2) Copy all folders and files from the module folder to admin folder.
3) Database Installation or run the attached SQL Script through PHPMYADMIN:
                (a)
                CREATE TABLE `cre_loaded_test`.`create_purchase_order` (
                `order_id` VARCHAR( 255 ) NOT NULL ,
                `product_sku` VARCHAR( 255 ) NOT NULL ,
                `order_quantity` INT( 100 ) NOT NULL ,
                `order_supplied` INT( 100 ) NOT NULL
                ) ENGINE = MYISAM ;
                (b)
                CREATE TABLE `cre_loaded_test`.`orders_services` (
                `orders_services_id` INT NOT NULL AUTO_INCREMENT PRIMARY
                KEY,
                `orders_id` INT NOT NULL,
                `service_desc` TEXT NOT NULL,
                `product_serial_num` VARCHAR (50) NOT NULL,
                `service_tax` DECIMAL( 7, 4 ) NOT NULL ,
                `service_ price` DECIMAL( 15, 4 ) NOT NULL ,
                `service_disc` DECIMAL( 15, 4 ) NOT NULL ,
                `service_status` ENUM( 'E', 'P' ) NOT NULL DEFAULT 'E'
                ) ENGINE = MYISAM ;
                (c)
                ALTER TABLE `orders` ADD `order_serial` VARCHAR( 20 ) NOT
                NULL ,
                ADD `order_type` ENUM( 'O', 'S' ) NOT NULL DEFAULT 'O';
                (d)
                INSERT INTO `cre_loaded_test`.`orders_status` (`orders_status_id`,
                `language_id`, `orders_status_name`) VALUES ('77777', '1', 'Complete');
Copyright 2010-2011 www.codeclouds.com all rights reserved                                    1
                                                                   Mobile Application
                                                                   Website Development
                                                                   Graphics Design
                                                                   E-Commerce
4) Modify page - 'application_top.php' in 'root/admin/includes'
Find
require(DIR_FS_CLASSES . 'shopping_cart.php');
under this line please insert a following codes :
  // the class will reload any information that was stored in the session
 $cart = new shoppingCart();
 // require price formatter class
 require(DIR_FS_CLASSES . 'PriceFormatter.php');
 $pf = new PriceFormatter;
5) Modify page - 'column_left.php' in 'root/admin/includes'
Find
if (tep_admin_check_boxes('tools.php') == true) {
     require(DIR_WS_BOXES . 'tools.php');
   }
Under this line please insert a following codes :
    if (tep_admin_check_boxes('tools2.php') == true) {
      require(DIR_WS_BOXES . 'tools2.php');
    }
6) MOdify page - 'filenames.php' in 'root/admin/includes'
Find
define('FILENAME_BACKUP_MYSQL','backup_mysql.php');
Under this line please insert a following codes :
 define('FILENAME_POS','pos.php');
 define('FILENAME_SERVICE','service.php');
Copyright 2010-2011 www.codeclouds.com all rights reserved                               2
                                                             Mobile Application
                                                             Website Development
                                                             Graphics Design
                                                             E-Commerce
7) MOdify page - 'print.css' in 'root/admin/includes'
(a) (Optional)
Insert following at the end of this file.
 .border_1 {
        border-bottom:solid 1px #000;
        border-right:solid 1px #000;
 }
 .border_2 {
        border-right:solid 1px #000;
 }
(b)
Find
.dataTableHeadingRow
Modify the codes as follows :
Please commented the line which is containing 'background-color: #C9C9C9;'
and then insert 'font-size: 11px;' Now it will look like
 .dataTableHeadingRow {
        /*background-color: #C9C9C9; */
        font-size: 11px;
 }
(c)
Find
.dataTableContent
 Change the 'font-size:' to 13px:
Copyright 2010-2011 www.codeclouds.com all rights reserved                         3
                                                                    Mobile Application
                                                                    Website Development
                                                                    Graphics Design
                                                                    E-Commerce
8) Modify page - 'english.php' in 'root/admin/includes/languages'
Find
define('BOX_TOOLS_WHOS_ONLINE', 'Who\'s Online');
Under this line please insert a following codes :
 define('BOX_HEADING_POS', 'Pos');
 define('BOX_HEADING_INVEN', 'Inventory');
 define('BOX_POS_ENTRY', 'Sales');
 define('BOX_SERVICE_ENTRY', 'Service');
9) MOdify page - 'order.php' in 'root/admin/includes/classes'
(a) Optional ( Only Required If you face any error during operation )
Find
$this->content_type = $cart->get_content_type();
Change it to
$this->content_type = 'physical'; or $this->content_type = '';
(b) Modify the codes as follows near line no 39
Before
 $totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL . "
where orders_id = '" . (int)$order_id . "' order by sort_order");
   while ($totals = tep_db_fetch_array($totals_query)) {
     $this->totals[] = array('title' => $totals['title'],
                     'text' => $totals['text']);
   }
After
Copyright 2010-2011 www.codeclouds.com all rights reserved                                4
                                                               Mobile Application
                                                               Website Development
                                                               Graphics Design
                                                               E-Commerce
   $totals_query = tep_db_query("select title, text, value from " .
 TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by
 sort_order");
     while ($totals = tep_db_fetch_array($totals_query)) {
       $this->totals[] = array('title' => $totals['title'],
                       'text' => $totals['text'],
                   'value' => $totals['value']
 );
     }
(b)
Modify the codes as follows near line no 36
Before
$order_id = tep_db_prepare_input($order_id);
     $order_query = tep_db_query("select customers_id, customers_name,
customers_company, customers_street_address, customers_suburb, customers_city,
customers_postcode, customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_telephone,
delivery_fax, delivery_email_address, delivery_name, delivery_company,
delivery_street_address, delivery_suburb, delivery_city, delivery_postcode,
delivery_state, delivery_country, delivery_address_format_id, billing_telephone,
billing_fax, billing_email_address, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state,
billing_country, billing_address_format_id, payment_method, currency, currency_value,
date_purchased, orders_status, ipaddy, ipisp, last_modified, payment_id, account_name,
account_number, po_number from " . TABLE_ORDERS . " where orders_id = '" .
(int)$order_id . "'");
     $order = tep_db_fetch_array($order_query);
After
Copyright 2010-2011 www.codeclouds.com all rights reserved                           5
                                                                  Mobile Application
                                                                  Website Development
                                                                  Graphics Design
                                                                  E-Commerce
  $order_id = tep_db_prepare_input($order_id);
      $order_query = tep_db_query("select customers_id, customers_name,
 customers_company, customers_street_address, customers_suburb, customers_city,
 customers_postcode, customers_state, customers_country, customers_telephone,
 customers_email_address, customers_address_format_id, delivery_telephone,
 delivery_fax, delivery_email_address, delivery_name, delivery_company,
 delivery_street_address, delivery_suburb, delivery_city, delivery_postcode,
 delivery_state, delivery_country, delivery_address_format_id, billing_telephone,
 billing_fax, billing_email_address, billing_name, billing_company,
 billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state,
 billing_country, billing_address_format_id, payment_method, currency,
 currency_value, date_purchased, orders_status, ipaddy, ipisp, last_modified,
 payment_id, account_name, account_number, po_number, order_serial, order_type
 from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
      $order = tep_db_fetch_array($order_query);
(c)
Find near line no 68
'orders_status_number' => $order['orders_status'],
Under this line please insert a following codes :
 'order_serial' => $order['order_serial'],
 'order_type' => $order['order_type'],
10) MOdify page - 'order.php' in 'root/includes/classes'
(a) Near line no 39
Before
$order_query = tep_db_query("select customers_id, customers_name,
customers_company, customers_street_address, customers_suburb, customers_city,
customers_postcode, customers_state, customers_country, customers_telephone,
customers_email_address, customers_address_format_id, delivery_telephone,
delivery_fax, delivery_email_address, delivery_name, delivery_company,
delivery_street_address, delivery_suburb, delivery_city, delivery_postcode,
delivery_state, delivery_country, delivery_address_format_id, billing_telephone,
billing_fax, billing_email_address, billing_name, billing_company,
billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state,
Copyright 2010-2011 www.codeclouds.com all rights reserved                                6
                                                                  Mobile Application
                                                                  Website Development
                                                                  Graphics Design
                                                                  E-Commerce
billing_country, billing_address_format_id, payment_method, payment_id, currency,
currency_value, date_purchased, orders_status, ipaddy, ipisp, last_modified from " .
TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
     $order = tep_db_fetch_array($order_query);
   $totals_query = tep_db_query("select title, text from " . TABLE_ORDERS_TOTAL .
" where orders_id = '" . (int)$order_id . "' order by sort_order");
   while ($totals = tep_db_fetch_array($totals_query)) {
     $this->totals[] = array('title' => $totals['title'],
                     'text' => $totals['text']);
   }
After
 $order_query = tep_db_query("select customers_id, customers_name,
 customers_company, customers_street_address, customers_suburb, customers_city,
 customers_postcode, customers_state, customers_country, customers_telephone,
 customers_email_address, customers_address_format_id, delivery_telephone,
 delivery_fax, delivery_email_address, delivery_name, delivery_company,
 delivery_street_address, delivery_suburb, delivery_city, delivery_postcode,
 delivery_state, delivery_country, delivery_address_format_id, billing_telephone,
 billing_fax, billing_email_address, billing_name, billing_company,
 billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state,
 billing_country, billing_address_format_id, payment_method, payment_id, currency,
 currency_value, date_purchased, orders_status, ipaddy, ipisp, last_modified from " .
 TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
      $order = tep_db_fetch_array($order_query);
     $totals_query = tep_db_query("select title, text, value from " .
 TABLE_ORDERS_TOTAL . " where orders_id = '" . (int)$order_id . "' order by
 sort_order");
     while ($totals = tep_db_fetch_array($totals_query)) {
      $this->totals[] = array('title' => $totals['title'],
                      'text' => $totals['text'],
                   'value' => $totals['value']
 );
        }
11) Please re-place the two images in 'root/admin/images/' folder ( the logo is being used
in the invoice printout )
cclogo.bmp
Copyright 2010-2011 www.codeclouds.com all rights reserved                                7
                                                                Mobile Application
                                                                Website Development
                                                                Graphics Design
                                                                E-Commerce
cclogo.jpg
12) We need to add the Database Connectivity String to the following files (** Please
note, this plug-in can’t read the CRELOADED Database Connection ) under
'root/admin/’
add_or_qun.php
update_or_qun.php
Create_pdf.php
13) Change the following on the configure.php under root/admin/includes/
Find
define('DIR_WS_CATALOG', '/creloaded/');
Change it to
define('DIR_WS_CATALOG', '/');
14: Guest User (Optional) : For the Quick Sale Functionality, A Guest User need to setup
with the “POS Plug-in”. First create an user or find an existing user
Copyright 2010-2011 www.codeclouds.com all rights reserved                              8
                                                    Mobile Application
                                                    Website Development
                                                    Graphics Design
                                                    E-Commerce
Find
order_create_quick_sale('20');
Change it to
order_create_quick_sale('20');
Copyright 2010-2011 www.codeclouds.com all rights reserved                9