These online order forms give Ubersmith clients the ability to sell their services easily via their website.
This has been tested on a LAMP stack running PHP 5.3+, MySQL 5+, Apache 2+ with mod_rewrite, and CentOS. It should work on your favorite flavor or Linux and should be fine behind Nginx or another web server. It may even work with MySQL <5. The only hard requirement is PHP 5.3+.
To get started:
Clone the repository onto the server that will be housing the order forms:
git clone https://github.com/TeamUbersmith/order-forms.git
cd order-forms
mkdir -p app/tmp/cache
mkdir -p app/tmp/persistent
chmod -R 0777 app/tmp/
After setting up a MySQL database, import the SQL dump file, and then remove it
mysql -u user -p database < dump.sql
rm dump.sql
Copy the sample config files into their final resting place
cp app/Config/database.php.sample app/Config/database.php
cp app/Config/core.php.sample app/Config/core.php
Edit app/Config/database.php
with your database connection details. Replace {ENVIRONMENT}
in steps 5 and 7 with the array key you placed the connection details in - either production
or test
.
Run the following command to install the cake_sessions table.
export CAKE_ENV={ENVIRONMENT}; app/Console/cake schema create sessions
Edit app/Config/core.php
with your preferences (relavant config is near the bottom of file)
Create your virtual hosts file for ports 80 and 443 (tweak for Nginx or other):
<VirtualHost _default_:80>
ServerName order-forms.yourdomain.com
DocumentRoot /var/www/order-forms
SetEnv {ENVIRONMENT}
<Directory /var/www/order-forms>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost _default_:443>
ServerName order-forms.yourdomain.com
DocumentRoot /var/www/order-forms
SetEnv {ENVIRONMENT}
<Directory /var/www/order-forms>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
SSLEngine on
SSLCertificateFile /path/to/server.crt
SSLCertificateKeyFile /path/to/server.key
</VirtualHost>
Restart Apache, and then visit http://order-forms.yourdomain.com