Chris ! Thanks for the answer. You have dispelled my doubts.
And now I fulfil the promise. If you have the BTS installed the installation of Subcategory textboxes will have the following appearance :
1. Run subcategory_textboxes.sql ** This is not optional! **
2. New files to install (4)
---------------------------
1) admin/products_extra_category.php
2) admin/includes/languages/english/products_extra_category.php
3) admin/includes/languages/russian/products_extra_category.php
4) includes/modules/products_extra_category.php
3. Existing files to edit (10) ( if you have two languages in your shop )
-----------------------------
Note: line numbers, where given, are for a vanilla MS2.2 installation and yours may vary according to your other installed contributions.
-------------------------------------------------------------------------
1. admin/includes/boxes/catalog.php
AFTER:
'<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' .
Add:
'<a href="' . tep_href_link(FILENAME_CATEGORIES_EXTRA, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_EXTRA_DESCRIPTION . '</a><br />' . //Added for extra categories information
-------------------------------------------------------------------------
2. admin/includes/filenames.php
BEFORE closing ?>
Add:
define('FILENAME_CATEGORIES_EXTRA','products_extra_category.php'); // added for Subcategory textboxes
-------------------------------------------------------------------------
3. admin/includes/database_tables.php
BEFORE closing ?>
Add:
define('TABLE_EXTRA_CATEGORIES','extra_cat_info'); // added for Subcategory textboxes
-------------------------------------------------------------------------
4. admin/includes/languages/english.php
BEFORE closing ?>
Add:
define('BOX_CATALOG_CATEGORIES_EXTRA_DESCRIPTION','Subcategory textbox'); // added for Subcategory textboxes
-------------------------------------------------------------------------
5. admin/includes/languages/espanol.php
BEFORE closing ?>
Add:
define('BOX_CATALOG_CATEGORIES_EXTRA_DESCRIPTION','Subcategorнa caja de texto'); // added for Subcategory textboxes
-------------------------------------------------------------------------
6. catalog/templates/fallback/content/index_nested.tpl
AFTER (around line 11):
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
Add:
<?php if (DISPLAY_CATS_ON_MAIN == 'true'){
include(DIR_WS_MODULES . FILENAME_CAT_TEXTBOX_MODULE); // added for Subcategory textboxes
}
?>
---------------------------------------------------------------------------
7. catalog/templates/fallback/content/index_products.tpl
BEFORE (around line 64):
<tr>
<td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
</tr>
Add:
<?php include(DIR_WS_MODULES . FILENAME_CAT_TEXTBOX_MODULE); // added for Subcategory textboxes ?>
-------------------------------------------------------------------------
8. catalog/includes/database_tables.php
BEFORE closing ?>
Add:
define('TABLE_EXTRA_CATEGORIES','extra_cat_info'); // added for Subcategory textboxes
-------------------------------------------------------------------------
9. includes/filenames.php
BEFORE closing ?>
Add:
define('FILENAME_CAT_TEXTBOX_MODULE', 'products_extra_category.php'); // Added for category textboxes contribution
-------------------------------------------------------------------------
10. catalog/templates/fallback/content/product_info.tpl
AFTER (around line 85):
if (tep_not_null($product_info['products_model'])) {
$products_name = $product_info['products_name'] . '<br /><br /><span class="smallTextOR">Our code: ' . $product_info['products_model'] . '</span>';
} else {
$products_name = $product_info['products_name'];
}
?>
Add:
<?php
// category textbox mod
if (DISPLAY_EXTRA_CATEGORIES == 'true' && DISPLAY_CATS_ON_PROD_LISTING == 'true'){
if ($product_check['total'] >= 1) {
// now get textbox description for this *product* and display
$query = tep_db_query("select categories_description from " . TABLE_EXTRA_CATEGORIES . " left join " . TABLE_PRODUCTS_TO_CATEGORIES . " using (categories_id) where " . TABLE_PRODUCTS_TO_CATEGORIES .".products_id=" . (int)$HTTP_GET_VARS['products_id'] . " and " . TABLE_EXTRA_CATEGORIES .".language_id = '" . (int)$languages_id . "'");
while($category_info_text = tep_db_fetch_array($query)){
if(!empty($category_info_text['categories_description'])){ // prevent output where description not set for particular language
echo ("<tr><td colspan=\"2\"><div class=\"cat_info_box\">".$category_info_text['categories_description']."</div></td></tr>");
}
}
}
}
?>
-------------------------------------------------------------------------
11. catalog/stylesheet.css
Add (** Note: amend colours, border etc as necessary to suit your current css scheme! **):
/* category information boxes */
.cat_info_box {background: #fff6e6; border: solid 1px #6FA1C8; padding: 8px; margin-bottom: 10px; font-family: Verdana, Arial, sans-serif;
font-size: 11px; font-weight: bold}
-------------------------------------------------------------------------
** End files to edit **
So only the points #7 and # 10 of original installation procedure must be changed.
Best regards