*********************************************************************************************************************
Recently Viewed Products (sales optimized) for osCommerce 2.3.4.(1.) Bootstrap
*********************************************************************************************************************
				Version 4.6.1 BS 
				by @raiwa 
				info@sarplataygemas.com
				www.oscaddons.com

*********************************************************************************************************************
    Backup your site PHP files and database. Do this before you even read the rest of these instructions. 
*********************************************************************************************************************
Update 4.6.1 to 4.6.2
*********************************************************************************************************************

STEP 1 Upload and replace the following file:
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php

*********************************************************************************************************************
Update 4.5 to 4.6.1
*********************************************************************************************************************

STEP 1 Upload the following new files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/header/templates/tpl_cm_header_recently_viewed.php
[catalog/]includes/modules/content/header/cm_header_recently_viewed.php
[catalog/]includes/modules/content/index/templates/tpl_cm_i_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/index_nested/templates/tpl_cm_in_recently_viewed.php
[catalog/]includes/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/modules/content/product_info/templates/tpl_cm_pi_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/templates/tpl_cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/templates/tpl_cm_sc_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php
[catalog/]recently_viewed.php

STEP 2 Delete the following template files:
[catalog/]includes/modules/content/header/templates/recently_viewed.php
[catalog/]includes/modules/content/index/templates/recently_viewed.php
[catalog/]includes/modules/content/index_nested/templates/category_recently_viewed.php
[catalog/]includes/modules/content/product_info/templates/recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/templates/recently_viewed_continue.php
[catalog/]includes/modules/content/shopping_cart/templates/recently_viewed.php


*********************************************************************************************************************
Update 4.4 to 4.5
*********************************************************************************************************************

STEP 1 Upload the following new files:
[catalog/]includes/languages/english/modules/content/header/cm_header_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/header/cm_header_recently_viewed.php
[catalog/]includes/languages/german/modules/content/header/cm_header_recently_viewed.php
[catalog/]includes/modules/content/header/templates/recently_viewed.php
[catalog/]includes/modules/content/header/cm_header_recently_viewed.php

STEP 2 After installing the files, point your browser in your Admin area and install the module:

    Optional Module
		Admin > Modules > Content:
    Install Content Module: Recently Viewed (header)
Shows the Recently Viewed module in the header area

Default Settings:

Enable Recently Header menu
True

Content Width
12

Sort Order
0

Number of Products
6

Show the product image
True

Show the product name
True

Maximum word length
40

Maximum of characters
32

Show the product price
True

Show the product MORE button
True

Show the actual products
False

Product order
Newest

*********************************************************************************************************************
Update 4.3 to 4.4
*********************************************************************************************************************

STEP 1 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_recently_viewed.php
[catalog/]recently_viewed.php

*********************************************************************************************************************
Update 4.2 to 4.3
*********************************************************************************************************************

STEP 1 Upload and replace the following files:
[catalog/]recently_viewed.php

*********************************************************************************************************************
Update 4.1 to 4.2
*********************************************************************************************************************

STEP 1 Upload and replace the following files:
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php
[catalog/]recently_viewed.php

*********************************************************************************************************************
Update 4.0 to 4.1
*********************************************************************************************************************

STEP 1 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_recently_viewed.php

STEP 2 Delete the following file:
[catalog/]includes/functions/recently_viewed.php

STEP 3 If you do not use the modularized shopping cart, there were wrong instructions included in vers. 4.0.

Check the Instructions included in this version: STEP 4 - Shopping Cart Page

*********************************************************************************************************************
Update 3.4 to 4.0
*********************************************************************************************************************

STEP 1 Uninstall the following 3 recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/modules/boxes/templates/recently_viewed.php
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php

STEP 3 Upload the following new files:
[catalog/]includes/languages/english/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/languages/english/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/languages/english/modules/content/shopping_cart/cm_sc_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/shopping_cart/cm_sc_recently_viewed.php
[catalog/]includes/languages/german/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/languages/german/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/languages/german/modules/content/shopping_cart/cm_sc_recently_viewed.php
[catalog/]includes/modules/content/index_nested/templates/category_recently_viewed.php
[catalog/]includes/modules/content/index_nested/cm_in_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/templates/recently_viewed_continue.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_continue_recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/templates/recently_viewed.php
[catalog/]includes/modules/content/shopping_cart/cm_sc_recently_viewed.php

STEP 4 Install the modules you wish to use:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Index Nested]
- Admin => Modules => Content => Recently Viewed [Product Info]
- Admin => Modules => Content => Continue shopping & Recently menu [Shopping Cart]
- Admin => Modules => Content => Recently Viewed [Shopping Cart]

STEP 5 Update Index page modularization to Core 2.3.4. BS EDGE since 12th of May 2016
In: [catalog/]index.php

a. Find around line 92:

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
    <div class="row">
        <?php echo $oscTemplate->getContent('index'); ?>
    </div>

Change to:

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>
    <div class="row">
        <?php echo $oscTemplate->getContent('index_nested'); ?>
    </div>

b. Find around line 250:
NOTE: this removes the recently products module on product level, this is not supported any more.

include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>

Change to:
  
include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>


STEP 6 - Follow instruction Step 4 of the main installation file for shopping_cart.php update

STEP 7 - Follow instruction Step 5 of the main installation file for currency class update

STEP 8 - Follow instruction Step 6 of the main installation file for font awesome icons update

*********************************************************************************************************************
Update 3.3r1 to 3.4
*********************************************************************************************************************

STEP 1 Uninstall the following 3 recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php

STEP 3 Install again the 3 modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 - Edit the following modified file

In: [catalog/]logoff.php

Find and remove (this code has been moved to the header tag module):
  
// recently_viewed
if ( tep_session_is_registered('recently_viewed') ) {
  tep_session_unregister('recently_viewed'); // for customer's security, this line of code removes the recently_viewed info after logoff
}

*********************************************************************************************************************
Update 3.3 to 3.3r1
*********************************************************************************************************************

STEP 1 Uninstall the recently viewed box module:
- Admin => Modules => Boxes => Recently Viewed

STEP 2 Upload and replace the following file:
[catalog/]includes/modules/boxes/bm_recently_viewed.php

STEP 3 Install again the box module:
- Admin => Modules => Boxes => Recently Viewed

*********************************************************************************************************************
Update 3.2r5 to 3.3
*********************************************************************************************************************

STEP 1 Uninstall the following 3 recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php

STEP 3 Install again the 3 modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

If you do not have yet included the 3 content module calls in your index.php:
In: [catalog/]index.php

STEP 4a. Find around line 92:

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

Add below:
  
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>


STEP 4b. Find around line 250:

    include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>

</div>

Add below:
  
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>

STEP 4c. Find around line 270:

  <div class="alert alert-info">
    <?php echo tep_customer_greeting(); ?>
  </div>

Add below:
  
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>

STEP 5
New configuration entry:
C.  Admin > Modules > Content:
    Install Module: Recently Viewed (index)

Index Levels enabled
The Levels where to show the Recently Viewed Module on index.
top=Home Page, this will show the recently viewed module on the welcome page below the customer greeting text
nested=Categories Level, this will show the recently viewed module on category pages under the new products module
products=Product listing Level, this will show the recently viewed module on product listing pages under the product listing module


*********************************************************************************************************************
Update 3.2r4 to 3.2r5
*********************************************************************************************************************

STEP 1 - Edit the following modified file

In: [catalog/]index.php

a. this will show the recently viewed module on category pages under the new products module
Find around line 92:

<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

Add below:
  
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>


b. this will show the recently viewed module on product listing pages under the product listing module
Find around line 250:

    include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING);
?>

</div>

Add below:
  
  <div class="row">
    <?php echo $oscTemplate->getContent('index'); ?>
  </div>

*********************************************************************************************************************
Update 3.2r3 to 3.2r4
*********************************************************************************************************************

STEP 1 Upload and replace the following file:
[catalog/]includes/modules/header_tags/ht_recently_viewed.php

*********************************************************************************************************************
Update 3.2r2 to 3.2r3
*********************************************************************************************************************

STEP 1 Uninstall the following recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php

STEP 3 Install again the modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

*********************************************************************************************************************
Update 3.2r1 to 3.2r2
*********************************************************************************************************************

STEP 1 Uninstall the following recently viewed module:
- Admin => Modules => Content => Recently Viewed [Index]

STEP 2 Upload and replace the following file:
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php

STEP 3 Install again the module:
- Admin => Modules => Content => Recently Viewed [Index]

*********************************************************************************************************************
Update 3.2 to 3.2r1
*********************************************************************************************************************

STEP 1 Uninstall the following recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/functions/recently_viewed.php
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php

STEP 3 Install the following modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

*********************************************************************************************************************
Update 3.0 to 3.2
*********************************************************************************************************************

STEP 1 Uninstall all recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload the following New files:
[catalog/]includes/languages/english/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/languages/espanol/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/languages/german/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php

STEP 3 Upload and replace the following files:
[catalog/]includes/languages/english/modules/boxes/bm_recently_viewed.php
[catalog/]includes/languages/english/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/languages/english/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/languages/english/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/languages/english/recently_viewed.php
[catalog/]includes/languages/espanol/modules/boxes/bm_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/languages/espanol/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/languages/espanol/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/languages/espanol/recently_viewed.php
[catalog/]includes/languages/german/modules/boxes/bm_recently_viewed.php
[catalog/]includes/languages/german/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/languages/german/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/languages/german/modules/header_tags/ht_recently_viewed.php
[catalog/]includes/languages/german/recently_viewed.php
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]includes/modules/header_tags/ht_recently_viewed.php
[catalog/]recently_viewed.php

STEP 4 Install again all modules:
- Admin => Modules => Header Tags => Recently Viewed
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 5 - Edit the following modified file

In: [catalog/]logoff.php

Find:
if ( tep_session_is_registered('comments') ) {
  tep_session_unregister('comments');
}

Add below:
  
// recently_viewed
if ( tep_session_is_registered('recently_viewed') ) {
  tep_session_unregister('recently_viewed'); // for customer's security, this line of code removes the recently_viewed info after logoff
}
  

*********************************************************************************************************************
Update 3.1 to 3.2
*********************************************************************************************************************

STEP 1 Uninstall the following recently viewed modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

STEP 2 Upload and replace the following files:
[catalog/]includes/modules/boxes/bm_recently_viewed.php
[catalog/]includes/modules/content/index/cm_i_recently_viewed.php
[catalog/]includes/modules/content/product_info/cm_pi_recently_viewed.php
[catalog/]recently_viewed.php

STEP 3 Install again all modules:
- Admin => Modules => Boxes => Recently Viewed
- Admin => Modules => Content => Recently Viewed [Index]
- Admin => Modules => Content => Recently Viewed [Product Info]

*********************************************************************************************************************
New Configuration Settings
*********************************************************************************************************************

C.  Admin > Modules > Content:
    Module: Recently Viewed (index)

Default Settings:

Show the VIEW and BUY buttons
True

Height mode
Equal Height

Fixed height value
11

*********************************************************************************************************************
D.  Admin > Modules > Content:
    Module: Recently Viewed (product_info)
   
Default Settings:

Height mode
Equal Height

Fixed height value
11


