User Tools

Site Tools


sunshop:preparing-for-upload

Preparing For Upload

Before you upload the files to your server, there are a few steps that need to be completed to ensure that the installation goes smoothly.

1. Choosing Your Distribution:

Because SunShop uses encryption on a few key files, Ioncube loaders are currently required for SunShop to be installed properly. Most hosting companies do support Ioncube loaders or a way to easily add them as needed. If you wish to install SunShop on your own server, you can download the Ioncube loaders FREE from their website. See: https://www.ioncube.com/loaders

The distribution you will require will be dependent on the PHP version your server is running. Currently there is a different distribution for PHP 7.4 and PHP 8.1.

2. Download SunShop:

To download SunShop, login to the TWT account area at https://www.twt-inc.com/clients/. Once logged in, navigate to your licenses “View Details” area and select the Downloads tab to download the software.

3. Extracting the Files

All distributions are available for download in two formats, tar.gz (tar) and zip. If you are downloading to a Windows machine, select the zip format and extract the files using WinZip or WinRar.

4. Modifying the Config File

Before transferring the files to your server, you will need to make changes to the “config.php” file located in the “sunshop/include/” directory.

Step 1 Navigate to the include/ directory and locate the file called “config.php.new”.

Step 2 Rename the file to “config.php”.

Step 3 Open the file in your favorite text editor such as WordPad or Notepad.

The contents of the file should look similar to the following:

<?PHP
/*
  include/config.php - (DATE) - (TIME PST) - (VERSION)
  
  SunShop Shopping Cart
  http://www.sunshop.com/
  
  Copyright (c) 2001-2024 Turnkey Web Tools, Inc.
*/

// License Key
$license_key = "";

// MySQL Extension ('mysql' or 'pdo_mysql') PHP 7.1+ Requires 'pdo_mysql'
$dbtype = "pdo_mysql";

// Hostname or IP of MySQL Server
$servername = "localhost";

// Name of MySQL Database
$dbname = "sunshop";

// Username & Password to Log Into MySQL Database
$dbusername = "sunshopuser";
$dbpassword = "sunshoppass";

// Table Prefixes: Do not change the value after the install has been finished!
// $dbprefix = "ss_"; // Uncomment this line if this is a new install

// SQL Debug Mode (0 = Off, 1 = On)
$sql_debug = 0;

// Shop Time Zone - List Available @ http://www.php.net/timezones
// Common: America/New_York, America/Los_Angeles, America/Phoenix
$time_zone = 'America/Los_Angeles';

// Change Admin Directory Name (Second Entry Defines The Directory Name)
if (!defined('ADMIN_DIR'))
	define('ADMIN_DIR', 'admin');

// Value Of 'true' Will Show Only Important Errors
if (!defined('PHP_ERRORS'))
	define('PHP_ERRORS', 'true');

// Block Storing Of Credit Cards
if (!defined('BLOCK_STORE_CC')) 
	define('BLOCK_STORE_CC', 'false');

// Block Template Saving w/ PHP Code
if (!defined('BLOCK_TEMPLATE_PHP')) 
	define('BLOCK_TEMPLATE_PHP', 'true');

Step 4 We will now alter the values between the quotes and input the values that you should have collected in the “Getting Started” step.

  • $license_key - The value for your license key can be retrieved TWT account area at https://www.twt-inc.com/clients/. The value for your license key should start with either “SS-”, “SSO-” or “SSASP-” followed by a series of numbers and letters.
  • $dbtype - This will be set depending on which PHP version you are running. The value “pdo_mysql” will generally work across multiple PHP versions.
  • $servername - This value should be set to the hostname of your MySQL server. Usually you are fine leaving this at “localhost”, but if the actual MySQL database is located on a different server you will need to change this to the proper hostname or IP address.
  • $dbname - This value should be set to name of the MySQL database. If you set this up yourself through your hosting companies control panel, you will most likely have to add a prefix to this value as displayed in your control panel.
  • $dbusername - This value should be set to username assigned to the MySQL database. This value may also need a prefix as the database name above.
  • $dbpassword - This value should be set to user password assigned to the MySQL database.
  • $dbprefix - By default this is commented out and not used. You will note the “” in front of this value. If you wish to use this, which is good if you have other information in the same database, uncomment this line by removing the “” before the line.
  • $sql_debug - Setting this value to 1 will display additional information on screen when MySQL errors occur. It is not recommended that this value be changed from 0 unless debugging is needed as it poses a security risk.
  • $time_zone - Set the time zone for your business. A list of acceptable time zones can be found at: http://www.php.net/timezones
  • ADMIN_DIR - If you wish to change the name of the admin directory to help boost security, you should change the directory name as well as this value to ensure the cart continues to function.
  • PHP_ERRORS - This setting will toggle the display of PHP errors as they occur. It is recommend that you keep this value set to 'true'.
  • BLOCK_STORE_CC - This setting will toggle the ability to block the storing of credit card numbers within the database. If you are using a payment processor, you can set this to 'true' since there will be no need to store those details at any point. Please note that storing credit card numbers can be a liability if PCI compliance is not in place.
  • BLOCK_TEMPLATE_PHP - This settings will block the ability to alter template files that contain PHP from within the admin area. It is recommended that you toggle this only as you need to make changes to template files. After the changes are made, you should consider setting the value to 'true' again.

Once you successfully change the values, save the file and continue to the next step.

5. Upload SunShop

Continue to Uploading SunShop

sunshop/preparing-for-upload.txt · Last modified: 2024/02/25 16:08 by twt-chris

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki