/ /website-builder/ /extensions/ /module-integration/ /order-form/

# Installation

This article will walk you through the steps necessary to install Lagom WHMCS One Step Order Form. We will guide you carefully through the whole installation process.

# Module Requirements

Below is a list of requirements for latest product version:

  1. Requires IonCube Loader v12 and later.
  2. InnoDB Engine used in WHMCS tables - learn more.
  3. Supports PHP 7.4 up to PHP 8.1.
  4. Supports WHMCS v8.2 and later.

# Before You Begin

  1. Make sure that the Lagom WHMCS One Step Order Form version, which you are trying to install, is compatible with your WHMCS and Lagom WHMCS Client Theme installations! Check the compatibility list here.
  2. Create a backup copy of your WHMCS files and database.

# Download Files

  1. Log in to ModulesGarden Client Area.
  2. Navigate to Products.
  3. Find "Lagom WHMCS One Step Order Form" on the list.
  4. Open the "Download" tab and download the latest version of the module.

# Upload Files

  1. Extract the .zip folder that has been downloaded from the client area.
  2. Upload the /php71+/ content to your FTP server.
  3. Make sure that during the upload process all the files have been correctly uploaded and no errors occurred.

# Enter License Key

  1. When you install "Lagom WHMCS One Step Order Form" for the first time, you have to rename the license_RENAME.php file. The file is located in modules/addons/LagomOrderForm/license_RENAME.php. Rename it from license_RENAME.php to license.php.
  2. Edit the previously renamed license.php file in order to provide your unique license key.
  3. Enter your license key between quotation marks as presented on below. You can find your license key in ModulesGarden client area: My Products → License Information.

# Edit Storage File Rights

  1. Set up the “storage” folder as recursively writable. This folder is available at your_whmcs/modules/addons/LagomOrderForm/. Folder permission depend on your server configuration, so you have to try the below
  • 700
  • 755
  • 777

# Apache Configuration

  1. Open the “htaccess” file, you will find it in the main root directory.
  2. If you have fully friendly rewrite set up, you will have to paste the below rule underneath RewriteBase /:
	RewriteBase /
    
    #one-step-order
	RewriteRule ^order/(.*)$ order.php?m=OneStepOrder&gid=$1 [L]
  1. Otherwise, create the below rule above the WHMCS rules:
   RewriteBase /
  
   #one-step-order
   RewriteRule ^order/(.*)$ order.php?m=OneStepOrder&gid=$1 [L]

# Nginx Configuration

If you are using an NGINX server, it is advised to add the below lines into its configuration file. Otherwise, the module might not work properly.

 location /order {
       rewrite ^/order/(.*)$ /order.php?m=OneStepOrder&gid=$1;
 }
       location /modules/addons/LagomOrderForm/api/ {
       try_files $uri $uri/ /modules/addons/LagomOrderForm/api/index.php?$args;
 }

In some cases the above code might not work well, in that situation, please use the below code instead ('break' added):

 location /order {
       rewrite ^/order/(.*)$ /order.php?m=OneStepOrder&gid=$1 break;
 }
       location /modules/addons/LagomOrderForm/api/ {
       try_files $uri $uri/ /modules/addons/LagomOrderForm/api/index.php?$args;
 }

Remember to adjust the above example to your WHMCS location.

# InnoDB Engine

The module requires the InnoDB Engine to be used by all WHMCS database tables.

# Check database engine

Below example describes steps required for MySQL database, if you are using different databse you need to perform different steps.

  1. Login into cPanel and open phpMyAdmin.
  2. Find the WHMCS database in left sidebar.
  3. Click on "SQL" tab, and paste following cuery show table status;.
  4. Click right bottom button.
  5. Below result will show up, where you can check the database engine for every WHMCS table:

# Replace selected tables

Take a look below to check how to change the database engine.

  1. Login into cPanel and open phpMyAdmin.
  2. Look at the column on the left, you will find there a list of database tables, select the one whose storage engine you are going to change.
  3. Click on the "Operations" tab.
  4. Find the "Storage Engine" option under the "Table options".
  5. Select the InnoDB Engine from the dropdown menu.
  6. Press "GO" to save the changes.

Alternatively, you may run the below SQL query after selecing the desired database from phpMyAdmin (step "2").

ALTER TABLE `table_name` ENGINE = InnoDB

After the query has been successfully executed, the database engine of the selected database table will be changed to "InnoDB".

# Replace all tables at once

Below describe how to replace the engine for all tables in your WHHMCS database, at once.

  1. Login into cPanel and open phpMyAdmin.
  2. Look at the column on the left, you will find there a list of database tables, select the one whose storage engine you are going to change.
  3. Click on the "SQL" tab.
  4. Enter below cuery to the SQL field, and click "Execute" button in right bottom corner. Please remember to replace the MyISAM and WHMCS_DATABASE_NAME with the correct strings:
SELECT CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;') 
FROM INFORMATION_SCHEMA.TABLES
WHERE ENGINE='MyISAM'
AND table_schema = 'WHMCS_DATABASE_NAME';
  1. Select "Full text" from the options list:
  1. Copy all results from the generated table:
  1. Copied code will include code similiar to below example:
CONCAT('ALTER TABLE ',TABLE_NAME,' ENGINE=InnoDB;')    
ALTER TABLE mod_invoicedata ENGINE=InnoDB;    
ALTER TABLE tblaccounts ENGINE=InnoDB;    
ALTER TABLE tblactivitylog ENGINE=InnoDB;    
ALTER TABLE tbladdonmodules ENGINE=InnoDB;    
ALTER TABLE tbladdons ENGINE=InnoDB;    
ALTER TABLE tbladminlog ENGINE=InnoDB;    
  1. Replace first line from the copied code with the following USE whmcs_database_name. Final result should be similiar to below:
USE WHMCS_DATABASE_NAME;
ALTER TABLE mod_invoicedata ENGINE=InnoDB;    
ALTER TABLE tblaccounts ENGINE=InnoDB;    
ALTER TABLE tblactivitylog ENGINE=InnoDB;    
ALTER TABLE tbladdonmodules ENGINE=InnoDB;    
ALTER TABLE tbladdons ENGINE=InnoDB;    
ALTER TABLE tbladminlog ENGINE=InnoDB;
  1. Enter the above code to the "SQL" tab, and click "Execute" button and that is all.

# Activate Addon

  1. Log in to the WHMCS admin area on your server.
  2. In the top right corner, click on “System Settings” and then choose “Addon Modules”.
  3. Activate the “Lagom WHMCS One Step Order Form” addon.
  4. Press the “Configure” button and select admin role groups (these groups may differ depending on the WHMCS installation) to grant access according to your needs, then save the changes.

# Configure Product

Your product has been correctly activated and you can now proceed with its configuration.

  1. Choose Order Template
  2. Configure Layout Settings
  3. Assign Gateway Icons