| Product Attribute Pictures Installation (CRELoaded) |
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 article. 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.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 FOR CRELOADED VERSIONS < 6.4 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. FOR CRELOADED VERSION 6.4.x Find the line: tep_admin_files_boxes(FILENAME_PRODUCTS_ATTRIBUTES, BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES, 'SSL','','2') . and add beneath it: tep_admin_files_boxes('paps.php', 'Attribute Pictures', 'SSL','','2') . 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 - 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: <?php echo $products_price; ?> NB - There may be more than one instance of this within the file. We will add the 'id' attribute in all instances. 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"> or this: <td id="price_display" align="right" class="infoBoxContents"> or this: <td id="price_display" class="pageHeading" align="right"> or this: <td id="price_display" class="productlisting-headingPrice"> depending on which version of CRELoaded you have and which instance of the price display code you are changing. Save and close the file. |
Step 6a - CRELOADED v6.2 AND v6.3 ONLY: The file you edit in this step depends upon which version of CRELoaded you are using. For versions up to and including
v6.2.* open the file /catalog/templates/[YOUR_TEMPLATE]/content/product_info.tpl.php. For version v6.3 open the file /includes/modules/product_info/product_attributes.php. The instructions in this step apply to either file. Place the following lines: //BOF Product Attribute Pictures require_once(DIR_WS_CLASSES . 'paps_delegate.php'); $paps_delegate = new paps_delegate(); $arr_globals = $paps_delegate->getProductGlobals($product_info['products_id']); //EOF Product Attribute Pictures immediately BEFORE this line: $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' "); Place the following lines: //BOF Product Attribute Pictures $heading_conf = $paps_delegate->getAttributeHeaderDisplaySettings($op_data['name'], (int)$HTTP_GET_VARS['products_id']); if((!$heading_conf['aas']) || ($arr_globals['unlink'])){ //EOF Product Attribute Pictures immediately AFTER this line: foreach ($options as $oID => $op_data) { Place the following lines: //BOF Product Attribute Pictures } //EOF Product Attribute Pictures immediately AFTER this line: } //end of switch |
Step 6b - CRELOADED v6.4 ONLY:
Open the file /catalog/includes/classes/creAttributes.php
All the changes take place inside the get_HTML() function. Place the following lines: //BOF Product Attribute Pictures require_once(DIR_WS_CLASSES . 'paps_delegate.php'); $paps_delegate = new paps_delegate(); $arr_globals = $paps_delegate->getProductGlobals($product_info['products_id']); //EOF Product Attribute Pictures immediately AFTER this line: $tax_rate = tep_get_tax_rate($this->tax_class);
Place the following lines: //BOF Product Attribute Pictures $heading_conf = $paps_delegate->getAttributeHeaderDisplaySettings($op_data['name'], (int)$this->products_id); if((!$heading_conf['aas']) || ($arr_globals['unlink'])){ //EOF Product Attribute Pictures immediately AFTER this line: foreach ($this->options as $oID => $op_data) { Place the following lines: //BOF Product Attribute Pictures } //EOF Product Attribute Pictures immediately AFTER this line: } //end of switch |
Step 7 - Open the file /catalog/templates/[YOUR_TEMPLATE]/content/product_info.tpl.php
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 native attribute processing code is executed
One possible position is just above this code (in CRELoaded v6.4):
<?php if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') {
If attribute pictures do not appear after you have set everything up in PAPs admin, try moving the position of this code further down the page.
Please ask us for support if you have any persistent problems. |
Step 8 - To enable 'Detached From Enlarged Image' as a Thumbnails Position Option - In /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 7, above) determines only the position of the thumbnails.
A separate file must be included in the product_info.tpl.php file 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.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 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.
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.
You are now ready to proceed to the User Guide and follow the steps outlined there. |
|