|
Documentation_1_1
This is the main documentation of the system.
Short descriptionMegadyne Calculator is a web application that can be used by some partners of Megadyne to calculate the prices of some products. The base data (like description, properties and prices) is read from an excel file. The calculation is done by the application. The partner needs to log in and choose a product (family, type, width or length)and qty and finally he gets the price of the chosen product. InstallationIn order to make the system work one will need to install the following software components:
The MegadyneCalculator software is shipped in a zip file whose content needs to be unzipped and copied to the server where the https server runs. The zip file contains the following directory structure: MegadyneCalculator
Configurationconfig.php#The smarty library root directory
define('SMARTY_DIR', '../classes/Smarty-3.1.8/libs/');
#The current version
$version = "2.2";
#The admin name
$adminName="";
#The admin password
$adminPassword="";
#The EUR/HUF exchange rate
$HUFEUR=300;
#The email address of Megadyne where the orders/inquiries should be sent
$companyEmailTo = "";
#The email address of Megadyne from where the orders/inquiries should be sent
$companyEmailFrom = "";
php.ini filelog_errors = On error_log parameter should be display_errors = Off Apache configThe directory where php has been installed should be set in apache http.conf Excel file descriptionThe following rules should be used during editing or creating the excel file containing the base data. No formulas should be found between the cells that are parsed by the program. Also care must be taken not to have non-printable characters in the cells. The USERID sheet should contain the usernames and password that can be used by the partners to login. It is good if this sheet is the first one in the excel, because the program will be faster. The first raw should contain the header of the data. It is skipped by the program. The column A should contain the partner/company names. The column B should contain the usernames while the column C should contain the passwords. Column D should (currency) contains the words "EUR" or "HUF". It contains the currency that is used when showing the prices to the partner. Column E should contain the default name of the person where the orders/inquiries should be sent Column F should contain the default email address where the order/inquiry should be sent column G should contain the default phone number of the partner. The FAMILIES sheet contains the discounts for each partner by product families. The first row contains the partner names (except the first three cells that is ignored by the program). The partner names should be exactly the same (case sensitively) as on the USERID sheet. The column A should contain product family names together with the category. The column B should contain the description of the Families. The column C should contain the Configuration number. The Configuration contains the Product Configurations described here. These control the behavior of the program on family level. The column D contains the tags. In each row there is a list of tags that belongs to a product family separated by comma. A tag can contain spaces as well. The tags can be used by the user on the web page on the top of menu. The user can choose one or more tags from the list of tags given at the product families. The menu will change according to the tags found by the product families. A product family will be shown in the menu if all the tags can be found at the product family that was given by the user on page. Each of the following columns should contain the discounts for a partner. The first row contains the partner name while other cells in the rows the discounts. The discount should be a number between 0 and 100. The discount can be a '-' sign as well. If the discount is - in a cell then the appropriate product family (row of the cell) is omited from the menu on the web site for the given partner (column of the cell). The PRICELIST sheet contains the prices of the products. The first raw is ignored by the program totally. The column A should contain the item numbers (required). The column B should contain the product family names together with the category. The same names should be used as in the FAMILIES sheet. The category and family names appear on the page concatenated (required). The column C should contain the Profile (required). The column D contains the Description that appears to the user on the web page (required). There are more columns that affect the behavior of the application. For each ProductConfigurations different column combination is used, so not all the columns should be filled for all the products. The union of the column for every ProductConfigurations is this:
Upload pageThere's a page for uploading an excel file. The excel file must be in a format like this: <something>YYYYMMDD.xls. The <something> part can be anything and the YYYYMMDD is the a day that is used as version of the excel file. This date will be visible on the main page's title afterwards. So we can always know which version of excel is active. How the system worksThe program is not using the excel file directly but php objects are created from excel that are serialized to the file system. When the partner is logging in, the serialized data is read for the usernames and passwords to authenticate the user. After this the discounts for the user are read and the pricelist as well. The serialized data is loaded each time a page request arrives to the server. Note: the calculator doesn't recognizes the number if it is written with coma only with point. |
material column should be excluded from the excel
"cutting cost" column has been added to excel description.