                   Header Tags SEO v3.3.914                  by Jack York aka Jack_MCS 
               https://oscommerce-solution.com

Works with osCommerce Phoenix version 1.0.8.0

Please read carefully and backup your files and database before installing.

This addon allows a shop to have a unique title and meta tags 
for any page in the shop. This is essential for having a shops pages 
listed well with the search engines. It also provides the option of 
adding category and manufacturer descriptions, using social bookmarks 
and optimizes many other parts of the shop for the search engines.

WANT IT DONE FOR YOU?
Order the installation and have Header Tags SEO installed and working
within 24 hours. This includes assistance with setting it up:
http://www.oscommerce-solution.com/header-tags-seo-p-122.html
Use the coupon code headertags_discount and save 10% off of the cost
of installation.

INSTALLATION:

======================================================================================================
DATABASE CHANGES: Upload the included headertags_seo_db_handler_hybrid.php 
 file to your root directory (where your index.php file is located).  Then 
 open your browser and type in (substitute your url, of course){

 https://www.yoursite.com/headertags_seo_db_handler_hybrid.php


======================================================================================================
NEW FILES TO ADD:

If you have not installed other addons into your shop, then upload all
of the files in both the catalog and catalog_only_new_files directories
to the same location in your shop and that will complete the installation.
If you have installed other addons or made other changes to the code, then 
you should only upload the files in the catalog_only_new_files directory 
and then make the following edits. 

PLEASE NOTE: The Phoenix files change fairly often so the files included 
in this package may not match your files. In that case, uploading the files 
could remove changes in the latest version of Phoenix. If in doubt, perform 
the manual installation below.

FILE CHANGES:
===================================================================

Upload the included files in templates/override/includes/components/ directory.

Be sure to check first to see if they already exist or if they are in a different 
templates directory, other than default. If they are present, make the following 
changed to them.

In template_top.php file,

FIND:

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

REPLACE WITH:

<?php
/*** Begin Header Tags SEO ***/
include('includes/header_tags.php');
/*** End Header Tags SEO ***/
?>


In the product_listing.php file,

FIND:

          $prod_list_contents .= '<a href="' . tep_href_link('product_info.php', 'products_id=' . (int)$listing['products_id']) . '">' . $listing['products_name'] . '</a>';
        }
        

ADD BENEATH:

        /*** Begin Header Tags SEO ***/
	include('includes/modules/header_tags_seo/header_tags_product_listing.php');
        /*** End Header Tags SEO ***/ 

 
FIND:

        if (tep_not_null($listing['products_seo_description'])) {
          $prod_list_contents .= '<div class="pt-2 font-weight-lighter">';
            $prod_list_contents .= $listing['products_seo_description'];
          $prod_list_contents .= '</div>' . PHP_EOL;
        }


REPLACE WITH:

        /*** Begin Header Tags SEO ***/
        if (false) { //remove for header Tags SEO
        if (tep_not_null($listing['products_seo_description'])) {
          $prod_list_contents .= '<div class="pt-2 font-weight-lighter">';
            $prod_list_contents .= $listing['products_seo_description'];
          $prod_list_contents .= '</div>' . PHP_EOL;
        }
  }
        /*** End Header Tags SEO ***/ 
        
       
===================================================================
In advanced_search_result.php, (optional, usually not too helpful)

FIND:

  $from_str = "from products p left join manufacturers m using(manufacturers_id) left join specials s on p.products_id = s.products_id";

REPLACE WITH:

  /*** Begin Header Tags SEO ***/ 
  if (HEADER_TAGS_STORE_KEYWORDS == 'True') {
      require('includes/modules/header_tags_seo/header_tags_keywords.php');
  }
  
  if (HEADER_TAGS_SEARCH_KEYWORDS == 'True') {
      $select_str .= ", hts.keyword ";
  }
  /*** End Header Tags SEO ***/ 
  
  $from_str = "FROM products p LEFT JOIN manufacturers m using(manufacturers_id) LEFT JOIN specials s ON p.products_id = s.products_id";
  
  /*** Begin Header Tags SEO ***/ 
  if (HEADER_TAGS_SEARCH_KEYWORDS == 'True') {
     $from_str .= " left join headertags_search hts on p.products_id = hts.product_id ";  
  }
  /*** END Header Tags SEO ***/ 
  

FIND:

          $where_str .= "pd.products_name LIKE '%" . tep_db_input($keyword) . "%' OR p.products_model LIKE '%" . tep_db_input($keyword) . "%' OR m.manufacturers_name LIKE '%" . tep_db_input($keyword) . "%'";
	  
ADD BENEATH:

          /*** Begin Header Tags SEO ***/
          if (HEADER_TAGS_SEARCH_KEYWORDS == 'True') {
            $where_str .= " or hts.keyword like '%" . tep_db_input($keyword) . "%'";
          }
          if (HEADER_TAGS_ENABLE_ADDITIONAL_WORDS == 'True') {
            $where_str .= " or pd.products_head_additional_words like '%" . tep_db_input($keyword) . "%'";
          }           
          /*** End Header Tags SEO ***/
      
======================================================================================================
The catalog section should now be installed and working!  However, if the admin
section has not been installed, some page headings may be missing. This is just
temporary and, in fact, shows that the installation is working so far. :) You
should proceed to the Install_Admin.txt file.

===========================================================================================
TROUBLESHOOTING:

To allow the admin section to access the includes/header_tags.php file, the
permissions for that file should be set to 755. The best way to be sure to 
get the settings correct is to check the settings on the images directory 
and set the ones for the Header Tags file to match those. If the settings on 
the images directory and the Header Tags file are different, a warning will 
appear in admin->Header Tags SEO. If that warning persists even though the 
code works, there is an option to turn it off in admin->Configuration->Header Tags. 
But if the changes you make in Header Tags don't stick, then turing that option 
off will only hide the problem.

If you are still having problems, go to admin->Header Tags SEO->Test and click
on the button on that page. That will display any failures found in the
installation. No errors should be found, except, possibly, the permissions error
(see above regarding permissions). If you get a failure and cannot figure it out, 
post that error in the support thread for the contribution. Questions about failures
without posting the results of the test will be answered by telling you to run 
the test, so please do that first.

************************************ SUPPORT *************************************
If you have any problems, see the troubleshooting sections in either of the Install
files or the test routine in admin->Header Tags SEO before asking in the support 
thread at

http://forums.oscommerce.com/topic/298099-header-tags-seo

************************** IMPORTANT *********************************
If you post a problem in the support thread, be sure to mention the version
of the shop you are using. Otherwise, you post may not get answered or it 
may be delayed while you find the needed version.
************************** IMPORTANT *********************************

Free support questions will not be answered if you PM me or contact me through 
my web site so please do not do so.


======================================================================================================


