
PRO version available:
https://www.phoenixcartaddons.com/related-products-p-43.html?sort=3a&page=2
	Additional options for PRO version:
	- Category selection menus added in Admin Page
	- Added optional display of Product Id, Name, Model in Admin Page
	- Sort order options added for Admin Page

************************************************************************************
Change log and version history
************************************************************************************
07 August 2026

Update Version Phoenix 8.1:
- Added Pi Layout Module to show related products as Product Variants above Options
- Tested with Phoenix 1.1.0.7 and PHP 8.5

************************************************************************************
24 March 2025

Update Version Phoenix 8.0:
- Updated admin/optional_related_products.php for Phoenix 1.1.0.0 and Bootstrap 5 compatibility
- Tested with Phoenix 1.1.0.0

************************************************************************************
22 October 2024

Update Version Phoenix 7.5.7:
- Updated $card['extra'] to array in templates for for Phoenix 1.0.9.5 compatibility
- Tested with Phoenix 1.0.9.7

************************************************************************************
26 July 2024

Update Version Phoenix 7.5.6:
- Update template width class in content modules to match Phoenix 1.0.9.4 core.

************************************************************************************
21 November 2022

Update Version Phoenix 7.5.5:
- Update admin page to fix warning message if there are orphan products. Thanks to @heatherbell for the report

************************************************************************************
18 November 2022

Update Version Phoenix 7.5.4:
- Update tep_cfg and db functions in content modules for Phoenix 1.0.8.19+

************************************************************************************
14 September 2022

Update Version Phoenix 7.5.3:
- Update admin page for Phoenix 1.0.8.17+. Content modules links.

************************************************************************************
4 April 2022

Update Version Phoenix 7.5.2:
- Fixed error in shopping cart module when no products in cart. Thanks to @ce7 for the report

************************************************************************************
29 January 2022

Update Version Phoenix 7.5.1:
- Fixed error in sql in shopping cart module. Thanks to @artfulweb for the report

************************************************************************************
4 December 2021

Update Version Phoenix 7.5.0:
- Updated for CE Phoenix 1.0.8.5+

************************************************************************************
19 July 2020

Update Version Phoenix 7.3.1:
- Updated for CE Phoenix 1.0.7.5+
- fixed admin/related_products.php delete not working if confirmation switched on.
- Updated tpl files

************************************************************************************
03 July 2020

Update Version Phoenix 7.3:
- Updated for CE Phoenix 1.0.5.4+
- Updated content modules to abstract executable modules
- bootstrapped admin page

************************************************************************************
21 January 2020

Update Version Phoenix 7.2:
- Updated for CE Phoenix 1.0.4.x
- hooked the changes for admin/categories.php. No more core code changes!

************************************************************************************
20 August 2019

Update Version Phoenix 7.1:
- Updated for CE Phoenix 1.0.2.x
- updated coding to match Phoenix 1.0.2.0 product listings and config entries
- simplified modules and removed config entries to show always product name, image and price
- simplified description length limit

************************************************************************************
25 July 2019

Update Version Phoenix 7.0:
- Updated for CE Phoenix 1.0.1.x
- fixed undefined warning in admin/optional_related_products.php if product info module is not installed.
- updated template class in product info module to core naming convention "cm-pi-related_product"
- update structured database
- added config entries for columns/viewport like also purchased products module.
- removed obsolete height control config entries.
- moved html to template

************************************************************************************
15 February 2019

Update Version 6.6 BS:
- Supressed any html output if no related products are available. Thanks to @Smoky Barnable for the advice
- conditioned >hr> tag if content is shown below.  Thanks to @Smoky Barnable for the advice
- updated template call and naming to 2.3.4.1. FROZEN standard
- changed module class names to match 2.3.4.1. FROZEN standard
- included references for 2.3.4.1 CE FROZEN to instructions

************************************************************************************
24 March 2017

Update Version 6.4 BS:
- replaced 'NONSSL' parameter by $request_type variable to ensure correct connection type for SSL.
************************************************************************************
8 January 2017

Update version 6.3 BS

- cleaned up the installation instructions, added missing step 3, language definitions for button in categories.php.
- added note to step 5, shopping cart page, to avoid duplicating the content module call.
- fixed undefined errors in admin/optional_related_products.php. Thanks to @Bonbec for the report
- fixed undefined errors in product info and shopping cart modules.
- added missing language definition to language files for delete confirm message in admin/optional_related_products.php
- renamed "MODULE_CONTENT_RELATED_PRODUCTS_SHOW_THUMBS" constant in product info and shopping cart module to avoid using the same constant for both modules.

************************************************************************************
26 September 2016

Update Version 6.2 BS:
	- Hardcoded paths for compatibility with latest 2.3.4 BS EDGE version (2016_09)
	- Fix for sql error if product name is disabled for admin. Thanks to @Omar_one
	- Added correct sort order for all listings depending if product_name, product_model or both are used
	- Fixed correct table heading depending if product_name, product_model or both are used
	- Added to optional related page install alert and install button for required product info module if not installed.
	- language file clean up
************************************************************************************
9 September 2016

Update Version 6.1r2 BS:
	- Fix for duplicate </p> tag if product name and no model was used in product info page and shopping cart modules.
************************************************************************************
29 August 2016

Update Version 6.1r1 BS:
	- Removed left over closing </div> tag from product info page modules. Thanks to @Omar_one
************************************************************************************
25 August 2016

Update Version 6.1 BS:
	- Added admin/box file and language files for less core changes. Thanks to @f.figue
************************************************************************************
23 August 2016

Update Version 6.0 BS:
	- Added "Delete Orphans" option to remove empty relations of deleted products
	- Added shopping cart module
	- all filenames and database table names hardcoded
	- Replaced all $HTTP_GET_VARS, $HTTP_POST_VARS with $_GET, $_POST.
	- admin/optional_related_products.php complete rewritten with optimized sql queries and general code clean up.
	- database install/update/remove queries integrated in product info module
	- related products functions integrated in product info module
	- separate admin/sql_setup_related_products.php removed
	- separate related products functions file removed
	- 2.3.4 standard support removed
************************************************************************************
3 November 2015

Update Version 5.6:
	- Insert database queries in Admin/optional_related_products modified to avoid integer error in certain databases.
	  Column list added to strip empty POP_id input. Thanks to @spidometrs for the report
************************************************************************************
30 September 2015

Update Version 5.5:
	- Database query optimized
	- <h5> tags changed to <p> tag for compatibility
************************************************************************************
27 July 2015

Fix Version 5.4 BS and standard:
	- Security fix in the database query. Thanks to @pchelpwebshop
************************************************************************************
22 June 2015

Fix Version 5.3 BS:
	- Old Table definition changed to hardcoded table name in the instructions for changes in [catalog/]admin/categories.php. Thanks to @dculley
	- Added condition "if(!function_exists('tep_version_readonly')" in [catalog/]admin/includes/functions/related_products_funcs.php to avoid error if the same function is already used in another Add-On.
************************************************************************************
26 May 2015

Fix Version 5.2 BS:
	- Fix for not working page links in Admin => Catalog => Related Products. Thanks to @dculley
************************************************************************************
27 March 2015

Version 5.1 BS
Contributed by Rainer Schmied @raiwa (info@sarplataygemas.com)

And released under the GNU GENERAL PUBLIC LICENSE

04 February 2007

Support Forum:
http://forums.oscommerce.com/topic/251243-optional-related-products-version-40/
************************************************************************************
08 March 2015

Version 5.0 BS
Contributed by Rainer Schmied @raiwa (info@sarplataygemas.com)

And released under the GNU GENERAL PUBLIC LICENSE

04 February 2007

Support Forum:
http://forums.oscommerce.com/topic/251243-optional-related-products-version-40/

************************************************************************************
Version 4.0
Contributed by Anita Cross (aka skittles)
And released under the GNU GENERAL PUBLIC LICENSE

This contribution is supported on the osCommerce forum:
http://forums.oscommerce.com/index.php?showtopic=251243

More Information and additional resources, screen shots, etc.
are available here:
http://www.callofthewildphoto/community/2293_contribution.html


************************************************************************************
Version 4.0 incorporates all features and patches through Version 3.3-c.

I'd like to thank Daniel Bahna, the original contributor of Optional Related
Products, and Dotcommakers, andes1, genius8237, Legend107, Alexian and i2Paq
for their excellent work on this contribution. It only is because of their
efforts I have been able to continue the evolution of a very useful add-on.

There is no support for languages other than English included with this release.
If you'd like to collaborate on adding support for your non-English language,
contact Skittles on the forum. She wants to hear from you!

************************************************************************************

New features for Version 5.1 BS:
	- Added height control to product boxes in product info modules. Thanks to @De Dokta
	- Added "SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT" and removed obsolete "'hspace="2" vspace="3"'". Thanks to @De Dokta
	- Added missing language fiules for sql_setup_related_products.php. Thanks to @grandpaj
	- Code clean up
	- Added update instructions for Version 5.0
************************************************************************************

New features for Version 5.0 BS:
  - Modified for Bootstrap
  - Product Info Page module has been converted to content module
  - Responsive Grid list like in core also purchased products module
  - Buy Now button has been removed for less core file changes
  - Configuration has been moved to content module
  - Database setup has been updated
  - All filenames and database table names are hardcoded
  - functions have been moved to separate files
  - spanish and german language files added
  - Admin buttons updated to jquery buttons
  
************************************************************************************
  New features for Version 4.0:
  - The database table has been renamed from `products_options_products` to
        `products_related_products`
  - A SQL Setup Utility has been added. This PHP file is accessed via the
        Admin as the last step of the installation, and makes all the
        changes to the database for installation or upgrade, depending on
        what option is chosen. It includes an option to remove the table and
        all the entries supporting this contribution.
  - A direct link to the configuration page has been added to the Related
        Products page.
  - A link to the SQL Setup Utility has also been added to the Related
        Products page.
  - The code used in product_info.php is now in a separate file:
	[catalog/]includes/modules/optional_related_products.php
  - All instances of related products for a specific product_id are deleted
    automatically when the product is deleted from the database through
    categories.php
  - The Related Products admin page has been revamped:
      - Uses text instead of image buttons for the basic list,
        compacting the list for easier viewing (and less scrolling.)
      - New Reciprocate function Inserts association in both directions.
      - Inherit function can be set to also Insert.
      - Delete function has been streamlined.
         - Delete Confirmation is now optional, set in Admin
         - A "pop-up" Delete Confirmation box allows confirmation or cancel
           without refreshing the page. The page is only refreshed after the
           Delete has been completed.
      - It is no longer possible to create duplicate entries.
      - Additional control of display has been added. Options are in Configuration.
  
    
************************************************************************************
  Version 5.1 configuration Options. They are controlled in Admin => Modules => .


      - Display Product Description
        - Default is False.
      - Maximum Description length
        - Default is 25 (words)
      - Define Number of Items to Display
        - Default is 0 (unlimited).
        - Maximum number of Related Products to display. 0 is unlimited.
      - Use Random Display Order
        - Default is False.
        - Adds random sort order to products displayed. Recommended if maximum number of products is set.
  - Multiple display options control the look of the Admin page.
         - Admin Display: Maximum Rows
            - Default is 10.
            - Sets the maximum number of rows listed per page.
         - Admin Display: Drop-Down List Maximum Length
            - Default is 0. (Unlimited)
            - Allows you to set a maximum length for the Product Name
              in the drop-down list. Does not affect the basic list.
              This is helpful when the product has a very long name, or
              when displaying both the Model and Name of the product.
         - Admin Display: Display List Maximum Length
            - Default is 0. (Unlimited)
            - Allows you to set a maximum length for the Product Name
              in the basic list. Does not affect the drop-down list.
              This is helpful when the product has a very long name, or
              when displaying both the Model and Name of the product.
         - Admin Display: Use Product Model
            - Default is False.
            - Allows you to include the Model. List is still ordered by
              product name. Can also be used alone.
         - Admin Display: Use Product Name
            - Default is True.
         - Admin Display: Combine Model and Name separator
            - Default is ':'.
            - When using Model with Name, provides separation between the two.
            - Only shows when "Use Product Model" is True. Can be empty.
         - Admin Function: Delete Confirmation.
            - Default is True.
         - Admin Function: Inherit includes Insert.
            - Default is False.
            - When set, both the product and it's associated products are "related"
              to the target product. Normally, this takes two operations.

************************************************************************************
