Installation guide for GrouponPro

Server Requirements

  • PHP Version - 5.x (preferably 5.2+ and <5.3.2)
    • Extensions
      • GD Version - 2.x+
      • PCRE Version - 7.x+
      • cURL version - 7.x+
      • json version - 1.x+
    • php.ini settings
      • max_execution_time - 180 (not mandatory)
      • max_input_time - 6000 (not mandatory)
      • memory_limit - 128M (at least 32M)
      • safe_mode - off
      • open_basedir - No Value
  • MySQL Version - 5.x
  • Apache - 1+ (preferably 2+)
    • Modules
      • mod_rewrite
      • mod_deflate (not mandatory, but highly recommended for better performance–gzip)
      • mod_expires (not mandatory, but highly recommended for better performance–browser caching)
  • Recommended Linux distributions: Fedora / Centos

Installation Steps

Setting up files

Unzip the zip file

Upload the unzipped files in server.

Need write permission for following folders

(Need write permission for php/apache; can be chmod 655 or 755 or 777 depending upon server configuration)

  1. app/media
  2. app/tmp
  3. app/webroot/js
  4. app/webroot/img
  5. app/webroot/css
  6. app/webroot/files
  7. app/vendors/shells/cron.sh
  8. core/cake/console/cake
  9. core/vendors/securimage
Change following item in app/config/config.php
$config['site']['domain'] = 'grouponpro'; // change to your domain name (only name like "yourdomain"). also you need to set this only when site routing url is set as subdomain.
Updating site logo

There are few places where site logo are located. To change those logo, you need to replace your logo with exact name and resolution in the following mentioned directories.

  • app/webroot/img/blue-theme - logo-email.png - 186 x 41
  • app/webroot/img/blue-theme - logo.png - 335 x 69
  • app/webroot/img/blue-theme - logo-black.png - 335 x 69
  • app/webroot/img/mobile - logo-blue.png - 172 x 26

Setting up database

  1. The sql file 'grouponpro_with_empty_data.sql' is also attached, which is located in 'app/config/sql'. import the database through phpmyadmin or any other tool.
  2. After importing the sql database, do not truncate any data directly from the database. All the data in the imported database are required. Removing unwanted cities can be done through administrator end which will be explained later in the following steps.
  3. In app/config/database.php, we need to change host, login, password, database. Update that in 4 places (For setting up master/slave setup, get professional help and it's not thoroughly tested)
(  
  'host' => 'localhost',
  'login' => 'dbuser',
  'password' => 'dbpassword',
  'database' => 'grouponpro'
)

Setting up apache

If you can reset 'DocumentRoot'

Reset your Apache DocumentRoot to /public_html/app/webroot/ by following means:

  • If you're on dedicated host, reset DocumentRoot in httpd.conf with /public_html/app/webroot/
  • If you're on shared host, reset your virtual directory to point to /public_html/app/webroot/

Note: This requirement is not mandatory, but highly preferred to skip the following tweaks in htaccess files.

If you cannot reset 'DocumentRoot'

Installing site directly in the root e.g., http://yourdomain.com/

Again, no need to tweak 'htaccess' files.

Installing site as a sub-folder e.g., http://yourdomain.com/myfolder
  • app/.htaccess ensure the RewriteBase as below:
RewriteBase    /myfolder/app/
  • app/webroot/.htaccess ensure the RewriteBase as below:
RewriteBase	/myfolder/

Setting up cron

Setup the cron with anyone of the following command,

*/2 * * * * /home/public_html/app/vendors/shells/cron.sh 1>> /home/public_html/app/tmp/error.log 2>> /home/public_html/app/tmp/error.log

Also you need to edit '/home/public_html/app/vendors/shells/cron.sh' file to change the folder path of each command. Note: Please replace ”/home/public_html/” with your folder path.

(or)

php4 is enabled for shell command in some server, above command will not work. In that case, you can use anyone of the following commands,

  • Command 1:

Check php installed path in server using ssh command. which php or which php5. It will give output like /usr/bin/php5.

vi /home/public_html/core/cake/console/cake
 
exec php -q ${LIB}cake.php -working "${APP}" "$@"

In the above file, change the php path with your server php5 installed path,

exec /usr/bin/php5 -q ${LIB}cake.php -working "${APP}" "$@"

(or)

  • Command 2:
*/2 * * * * wget http://yourdomain.com/cron/update_deal

(or)

  • Command 3:
*/2 * * * * lynx http://yourdomain.com/cron/update_deal

(or)

  • Command 4:
*/2 * * * * curl http://yourdomain.com/cron/update_deal

Running site for the first time

      username: admin
      password: agriya
  • To change administrator email address and other details, click 'My Account' in the top menu and in 'My Profile', you can edit your administrator information.

Manage site settings

  1. Site
    1. Default city
      • To change the default city, select 'settings → site' and change the default city. Please refer Admin Settings Site
      • It is a must that one city must be in approved state and selected as default city in order for the site to run carefully. Currently it is set as 'San Diego'. This city shouldn't be removed until some other city is set as default city.
    2. Contact Email Address
      • Its a must to change the contact email address of the site. All the mail for the administrator will be sent to this email address.
      • To change the contact email address, select 'settings → site' and change 'Contact Email Address'. Please refer Admin Settings Site
    3. Email Address
      • To change the email address of the site, select 'settings → site' and change the 'From Email Address'. Please refer Admin Settings Site
      • To change the email address for individual emails from the site, It is located in 'Masters → Email Templates', give the email address you want to give in each template. Leaving it as ##FROM_EMAIL## will take email address commonly set in settings which we have done in the previous step.
    4. Subscriptions
      • To disable three steps subscriptions, select 'settings → site' and uncheck the 'Enable three step subscription'. Please refer Admin Settings Site
  2. Facebook
    1. Application Key Creation
    2. Setting up keys in our site
      • Update the Facebook settings with the created Facebook details such as API key and Secret key.
      • Once you saved the data with 'API key' and 'Secret key', click the link 'Update Facebook Credentials' in the same page (please refer Update Facebook Credentials), you will be then asked to login into your Facebook account and you need to login in the Facebook account where you want the deal to get posted. After the process complete following details will update automatically 'Facebook Access Token' and 'Facebook User ID'. Please refer Update Facebook Credentials
  3. Twitter
    1. Application Key Creation
    2. Setting up keys in our site
      • Update the Twitter settings with the created Twitter application details such as 'Consumer key' and 'Consumer secret'.
      • Once you saved the data with 'Consumer key' and 'Consumer secret', click the link 'Update Twitter Credentials' in the same page (please refer Update Twitter Credentials), you will be then asked to login into your Twitter account and you need to login in the Twitter account where you want the deal to get posted. After the process complete following details will update automatically 'Access key' and 'Access token'. Please refer Update Twitter Credentials
  4. Friends
    1. Yahoo Application Key Creation
    2. MSN Application Key Creation
  5. Bitly
    • For creating Bitly application and getting necessary key details refer Bitly API Creation
    • To change the 'Bitly Username' and 'API key' details, click 'settings → Bitly' and change the details.

Manage cities

  1. If you want to give Facebook or Twitter link separately for each cities, select cities in sidebar under masters. Search the city you want to change and click edit to update the 'Facebook URL' or 'Twitter URL'.
  2. If you want to post deals on your Facebook wall for particular city then click 'Update Facebook Credentials', you will be then asked to login into your Facebook account (please refer Update Facebook Credentials). The deal will be posted in Facebook wall for currently logged in Facebook account when deal gets opened. Please refer Update Facebook Credentials
  3. If you want to post deals for particular city then click 'Update Twitter Credentials', you will be then asked to login into your Twitter account (please refer Update Twitter Credentials). The deal will be posted in the currently logged in Twitter account when deal gets opened. Please refer Update Twitter Credentials

Manage payment gateways

  1. Click the 'Payment Gateways' link at the sidebar under 'Payment'. You need to change the PayPal mode (live or test), API details, Payee account and Receiver emails in this page.
  2. AuthorizeNet, CreditCard, PayPal and Wallet options will be displayed here.
  3. Hover and click 'edit' to modify the settings for each of them.
  4. PayPal
    • For creating PayPal API key, please refer Creating PayPal API Key
    • PayPal Payee details and PayPal API Details will be present in Paypal list. Please refer PayPal Settings
    • Credit Card 'DirectPay' Details will be present in credit card list. Please refer Credit Card Settings
    • You need to setup IPN URL for Masspay. Please refer Masspay IPN URL setup
    • Also you need to check the things mentioned in screenshots in your PayPal account. Please refer PayPal Setup
    • To setup PayPal so that my user will automatically be returned to my site without needing to click any further confirmation button in PayPal? / to setup PayPal Auto Return URL. Please refer PayPal Auto Return Setup.
  5. Authorize.Net
    • For creating Authorize.net API key, refer Creating Authorize.net API Key
    • Update Authorize Net Api Key and Authorize Net Trans Key in edit AuthorizeNet page.
    • While adding a credit card a transaction is generated and submitted to the processor with the amount of $0.00 or $0.01. If successful, the transaction is immediately voided. Visa transactions are being switched from $0.01 to $0.00 for all processors. All other credit card types use $0.01.
    • You can check CIM transaction logs in our site also. Please refer AuthorizeNet CIM Transaction Logs.
  6. Wallet
    • Enable Wallet option will be enabled or disabled only under wallet list.