Home Documentation PAPs Installation (Premium Version) Product Attribute Pictures Installation (oscMax)
Product Attribute Pictures Installation (oscMax)

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:

  • 7 steps (plus 2 optional)
  • 4 files to edit
  • 7 database tables

If you are upgrading from a free version, you will be able to delete some redundant code (see below).

Fresh Installation

NOTE: 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. It is recommended that you obtain a license file for this software before installing all the files to avoid this problem. To get a license, see the licensing section.

If you have already installed the shareware version of this software there is no need to follow the steps below. Simply drop the new license file into you root folder and installation is complete.


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 sql/paps_v6.0.sql using your favorite database interface program. REMEMBER: if you are using prefixes for your database tables you need to add the prefix to the table names in the SQL file before you run the SQL commands.


Step 3 - Open the file catalog/admin/includes/boxes/catalog.php

EITHER:
Find the line: tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES) .
and add beneath it: tep_admin_files_boxes('paps.php', 'Attribute Pictures') .
Save and close the file.

OR:

Find the line: tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, TOP) .
and add beneath it: tep_admin_files_boxes('paps.php', 'Attribute Pictures', TOP) .
Save and close the file. OR:

Find the line: tep_admin_jqmenu(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, 'TOP') .
and add beneath it: tep_admin_jqmenu('paps.php', 'Attribute Pictures', TOP) .
Save and close the file.


Step 4 - Open the file catalog/templates/YOUR_TEMPLATE/content/shopping_cart.tpl.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/templates/YOUR_TEMPLATE/content/product_info.tpl.php

Find the line:$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
and place these lines immediately BEFORE it:

//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


Place the following line:

<?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:

  • 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);

If you are unsure of where to place this line, we would suggest initially putting it around line 205, immediately before a <tr> tag or immediately after a </tr> tag.


Step 6 - ONLY PERFORM THIS STEP IF YOU REQUIRE DYNAMIC PRODUCT PRICE UPDATES IN PAPS-ENABLED PRODUCT PAGES

Open the file /catalog/templates/[YOUR_TEMPLATE]/content/product_info.tpl.php
You must place the following attribute inside the HTML element which contains the product's price: id="price_display"

Find this code: echo $products_price;
Immediately before this code, there should be an HTML '<td>' element. Insert the 'id' attribute into the element so that the result will look like this:
<td id="price_display" class="pageHeading" align="right" valign="top">
Save and close the file.


Step 7 - ONLY PERFORM THIS STEP IF YOU WANT TO PLACE YOUR THUMBNAILS IN A NON-ADJACENT POSITION RELATIVE TO THE ENLARGED IMAGE

Open the file catalog/templates/YOUR_TEMPLATE/content/product_info.tpl.php
If you want the position of your thumbnails to not be directly adjacent to the enlarged image, you need to select the 'Detached From Enlarged Image' position from the dropdown menu in the PAPs admin panel. In this case, the position of the line:

<?php include(DIR_WS_MODULES . '/paps.php'); ?>

within the product_info.tpl.php file (which is placed in step 5 above) determines only the position of the thumbnails. A separate file must be included in the product_info.tpl.php page which will generate the enlarged picture wherever you place it. To include the enlarged picture elsewhere in your page, add the following line:

<?php include(DIR_WS_MODULES . '/paps_layout/enlarged_pic.php'); ?>

to your product_info.tpl.php file. As with the paps.php file included earlier, this display begins and ends with 'tr' tags, so should be placed within 'table' tags.

Step 8 - Open the file catalog/includes/classes/pad_base.php

Replace the entire function called function _build_attributes_array($build_stocked, $build_nonstocked)

With the replacement function found in the following text files:

For oscMax 2.0.x - 'pad_base_replace_oscMax2.0.txt'
For oscMax 2.5.x - 'pad_base_replace_oscMax2.5.txt'

You can find these files in the 'NOT_FOR_UPLOAD' folder of this distribution.


Step 9 - Ensure the following folders are fully writeable:

images/paps
images/paps/linked
images/paps/fonts
images/paps/swatch_enl
images/paps/swatch_enl/tmp
images/paps/tmp

Installation is now complete. Please make sure you allow Administrator access by storing the paps.php file by going to: Administrator->File Access->Catalog, click the 'store files' button on the right, then select paps.php from the dropdown menu.

You are now ready to proceed to the User Guide and follow the steps outlined there.

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.

 
Share

Copyright © 2012 Product Attribute Pictures. All Rights Reserved.