| Basic Product Attribute Pictures Installation (osCommerce) |
Installation If you have already installed PAPs and used it with the free 14-day trial license prior to purchasing a full license, there is no need to perform any of the steps below. You simply need
to request a new license from us by following the instructions in the licensing section. The installation process for this version of PAPS has been pared down to the minimum possible number of
steps and file edits. For your convenience it is significantly more streamlined compared to the free version,
requiring only: - 6 steps
- 3 files to edit
- 7 database tables
| Fresh Installation
| | Step 1 - Copy all the files and folders (even if some are empty) from the 'catalog' directory of this distribution to their respective
folders. |
Step 2 - Backup your database, and then run the code in the file NOT_FOR_UPLOAD/sql/paps_v7.0.sql using
your favorite database interface program. REMEMBER: do NOT add any prefixes to the PAPs database table names. |
Step 3 - Open the file catalog/admin/includes/boxes/catalog.php
For osCommerce v2.2 : Find the line: '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' . and add beneath it: '<a href="' . tep_href_link('paps.php', '', 'NONSSL') . '" class="menuBoxContentLink">Attribute Pictures</a><br>' .
For osCommerce v2.3+ : Find the following block of code: array( 'code' => FILENAME_PRODUCTS_ATTRIBUTES, 'title' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, 'link' => tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES) ), and add beneath it: array( 'code' => 'paps.php', 'title' => 'Attribute Pictures', 'link' => tep_href_link('paps.php') ), Save and close the file. |
NOTE: The next two steps will 'hook' the PAPs functionality into your product info and shopping cart pages. The PAPs code requires a license file
to operate and if this license file is not present an error message will be generated and your product info or shopping cart page will not display fully. If you have problems adding the license file, comment out the added lines
until the issue is resolved. To get a license, see the licensing section. |
Step 4 - Open the file catalog/shopping_cart.php Find the line: if (STOCK_CHECK == 'true') { and add above it: //BOF Product Attribute Pictures require(DIR_WS_MODULES . "paps_layout/paps4cart.php"); //EOF Product Attribute Pictures
|
Step 5 - Open the file /catalog/product_info.php
Place the following lines: //BOF Product Attribute Pictures require_once(DIR_WS_MODULES . 'paps_layout/includes/classes/paps_delegate.php'); $paps_delegate = new paps_delegate($product_info['products_id']); //EOF Product Attribute Pictures immediately AFTER this line: $product_info = tep_db_fetch_array($product_info_query); Place the following lines: //BOF Product Attribute Pictures if(!$paps_delegate->allowAttributeSelection($products_options_name['products_options_id'])){ //EOF Product Attribute Pictures immediately AFTER this line: while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
For osCommerce v2.2 Place the following lines: //BOF Product Attribute Pictures } //EOF Product Attribute Pictures immediately AFTER these lines: <tr> <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td> <td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td> </tr> <?php
For osCommerce v2.3 Place the following lines: //BOF Product Attribute Pictures } //EOF Product Attribute Pictures immediately AFTER these lines: <strong><br><php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br /> <?php
For Both Versions
Before adding the next line of code you should make sure you have a valid license for this product. Obtain a license from us by following the instructions in the licensing section and install it
on your site. Failure to do so may prevent PAPs working properly in both the admin and front end sections. Place the following lines: <?php include(DIR_WS_MODULES . '/paps.php'); ?> At the point in the file at which you would like the Product Attribute Pictures to be displayed. When placing this line,
please bear in mind the following points:- for osCommerce 2.3, the line of code above should be enclosed in HTML '<table></table>' tags
- for osCommerce 2.2, placement should be within an existing table - the display begins and ends with <tr></tr> tags
- placement should be anywhere after the line: $products_attributes = tep_db_fetch_array($products_attributes_query);
|
NOTE - If you want to enable automatic price updating and/or the 'detach from enlarged image' thumbnails position in your product info page, please
see the Optional Installation Steps section below.
|
Step 6 - Ensure the following folders are fully writeable by the server:
images/paps images/paps/linked images/paps/merged images/paps/fonts images/paps/swatch_enl images/paps/swatch_enl/tmp images/paps/tmp
|
IMPORTANT: If you get a white/blank page when trying to access the PAPs admin panel then the Ioncube Loader required to run PAPs
has not been properly installed on your server. Please go to http://yourdomainname/ioncube/loader-wizard.php for details on how to solve this issue.
Once you have your installation running properly, please delete the loader-wizard.php file for security reasons.
Installation is now complete. |
|