Jump to content
RobAnderson

Article Manager v1.0

Recommended Posts

1 hour ago, Fredi said:

Do you have news regarding this module?

It was ready for release but I found a few problems at the last minute. By the time I got those fixed another version of Phoenix had been released. So I just need to setup a new show and install it to make sure everything is OK. I hope to get a version uploaded in the next few weeks.

Share this post


Link to post
Share on other sites

If you need help with temting, I am ready to help.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Dear Jack,

I partially adapted Article Manager for the latest version of Phoenix. I am not a coder. This is a tough job for such a serious addon. But I managed to do a lot. These are big code corrections. The reason is the concept of our coders to destroy the possibility of using serious add-ons for Phoenix.
But basically, there are no problems that cannot be solved. And I slowly but solve them.
I have a test site on Phoenix 1.0.7.7. The article manager works on it (partially). In Admin everything is already working almost completely.

I hope you, as a professional coder, can devote your time to this add-on. If you need what I have already done, I will send it for you. This will save you time to update the Article Manager.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

A new version has been uploaded with the following changes.

  • Added a navbar modules to display links to articles. Pro version only.
  • Added a product module to display links to articles based on the cross sell settings. Pro version only.
  • Changed a large number of files to make them compatible with Phoenix 1.0.7.5 and above.
  • Changed article count in admin to show full details (status and blog count).
  • Changed class construction in the articles manager footer module to be compatible with php 7. Found by @artfulweb.
  • Changed code in admin so that the Header Tags SEO code works for multiple language. Found by @artfulweb.
  • Fixed failure on shop side when Header Tags SEO is not installed. Found by Dnj1964.
  • Removed the config page from the Article Manager section for Phoenix versions.
  • Removed the article meta tag description from the database and files.
  • Removed the caching code.

Notes:

  1. This is meant as a Phoenix version. The previous versions will still work but have not been updated.
  2. For Phoenix, installation just requires the database script to be ran and then the files to be uploaded. If you want the links to appear elsewhere in the site, see the instructions in the files for doing that.

 

Share this post


Link to post
Share on other sites

im get error while open articles.php in admin section 

"Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36 bytes) in C:\xampp\htdocs\tes\admin\includes\functions\articles.php on line 70"

what should i do Jack ?

Share this post


Link to post
Share on other sites

That error occurs when the account on the server doesn't have enough memory to handle the call. Without knowing which oscommerce versions you are using, I can only guess. But two of the versions have to do with getting topics around that location in the code so I assume that is the problem. Is this a new installation? If not, did you run the database script with the reset option?

Share this post


Link to post
Share on other sites
11 hours ago, Jack_mcs said:

That error occurs when the account on the server doesn't have enough memory to handle the call.

Yes , i think ... but im doing test on AM3 8Gb memory without adding products , pure ... even i dont have single article ..fresh install and i wanna add some addons ...

yes this is new installation jack , osCommerce Online Merchant v2.3.4.1 and im using MySQL 5.5.25a      PHP version :  5.4.4 (Zend: 2.4.0)  HTTP Server Apache/2.4.2 (Win32) OpenSSL/1.0.1c PHP/5.4.4 

 

Edited by JIPANG
add text

Share this post


Link to post
Share on other sites
2 minutes ago, JIPANG said:

AM3 8Gb memor

That's server memory, not necessarily  shop memory. But if this is a new install of this addon and you don't have any, or many topics, then it is not the memory itself. Something is probably looping that is causing the memory to be used and, if that is the case, it would fail regardless of how much memory there is.

I suggest you get the shop working correctly first, like adding a product. If the problem is a result of this addons code, it is probably being caused by some problem in the shop.

Share this post


Link to post
Share on other sites

Error code...
Line 137 in    article_manager_db_handler.php

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Topics Links?', 'ARTICLE_BOX_DISPLAY_TOPICS_LINKS', 'true', 'Display links to individual topics. Requires the Display Box Articles - All Topics Section option to be true. ', '" . $cfg_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', ', now(), NULL)";

Chnge to:

      $lines[] = "INSERT INTO configuration (" . $fields       . ") VALUES ('Display Box Articles - All Topics Links?', 'ARTICLE_BOX_DISPLAY_TOPICS_LINKS', 'true', 'Display links to individual topics. Requires the Display Box Articles - All Topics Section option to be true. ', '" . $cfg_group_id . "', '" . ($sortID++). "', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now(), NULL)";

 


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Hello Jach,
I cannot adapt the new version of the Article Manager for Phoenix version 1.0.7.9
Box Articles does not work correctly. I am trying to adapt the code, but the BoldTags function is not clear to me. What is the purpose of using this function?
Is it possible to clean up the code from this function and make it standard in order to simplify the work with the module?

Thank You.

Edited by Fredi

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

For the correct display of pages in other languages, for example, in Russian, or etc, you need to correct the file  includes/functions/articles.php

// Initializing a DOM object to hold our HTML
$dom = new DOMDocument;
$dom->loadHTML($html, LIBXML_HTML_NOIMPLIED  | LIBXML_HTML_NODEFDTD);
// Initializing a DOMXPath object to query on our DOM
$xpath = new DOMXPath($dom);

to

// Initializing a DOM object to hold our HTML
$dom = new DOMDocument();
$dom->loadHTML($html, '<?xml version="1.0" encoding="UTF-8">' | 'LIBXML_HTML_NOIMPLIED' | 'LIBXML_HTML_NODEFDTD');
// Initializing a DOMXPath object to query on our DOM
$xpath = new DOMXPath($dom);

This fixed the encoding bug, but one more remained:
Warning: DOMDocument::loadHTML() expects parameter 2 to be int, string given in /includes/functions/articles.php on line 315


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
On 10/21/2020 at 5:54 AM, Fredi said:

Box Articles does not work correctly.

What does this mean?

On 10/21/2020 at 5:54 AM, Fredi said:

I am trying to adapt the code, but the BoldTags function is not clear to me. What is the purpose of using this function?

It is just a common function to add bolding as needed.

 

16 hours ago, Fredi said:

For the correct display of pages in other languages

What symptoms should I look for when testing this? Does it fail to load at all? Has errors? Something else?

Share this post


Link to post
Share on other sites

I've been looking forward to adapting Article Manager for Phoenix for a very long time. I have working stores that work, but they are on the old 3 versions of OSC and I need to update them.
For over a year now I have been trying to adapt my stores to Phoenix. But the strategy for changing the core is incomprehensible and very radical.
The creators of the new kernel have done a lot of good, but there are a lot of problems with adapting old modules.
I've been working with Article Manager and its Phoenix adaptation for a long time. I managed to adapt it 2 times, but the next cardinal modification of the kernel breaks the work of the module.

Today I probably have a combined module based on your edition of the Article Manager and my modifications.

Thanks to your latest version, I finally managed to install the Article Manager on my site. The admin worked for me for a long time, but there were problems with adaptation with the new template system.
Thank you very much Jack for the great job you have done!

I am continuing to tweak the Article Manager on my test store. There are minor bugs. Some of them I can fix myself, but some I cannot and I will need help.
I will post bugs that I cannot handle on my own. If you have the opportunity, please help me finish this work.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
56 minutes ago, Jack_mcs said:
On 10/21/2020 at 12:54 PM, Fredi said:

I am trying to adapt the code, but the BoldTags function is not clear to me. What is the purpose of using this function?

It is just a common function to add bolding as needed.

I think adding bold where necessary is very simple: <b> ____  </b> or <strong> ____  </strong>
The use of BoldTag significantly complicates and makes the code heavier, adds an additional function and instead of a tag, we must write in the code:

. $boldTags['start'] .  ____   . $boldTags['stop'] .
very simple:    <b> ____  </b>    or    <strong> ____  </strong>

I beg your pardon, I'm probably wrong, but for me every complication of the code is a problem. I am not a coder.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Problem in artile_listing :

Warning: DOMDocument::loadHTML() expects parameter 2 to be int, string given in /includes/functions/articles.php on line 322

function tep_get_topic_seo_title($topic_id, $language_id) {
$topic_query = tep_db_query("SELECT topics_seo_title FROM topics_description WHERE topics_id = " . (int)$topic_id . " AND language_id = " . (int)$language_id);
$topic = tep_db_fetch_array($topic_query);
return $topic['topics_seo_title'];
}
-- line -322 --
function tep_get_author_seo_description($author_id, $language_id) {
$author_query = tep_db_query("SELECT authors_seo_description FROM authors_info WHERE authors_id = " . (int)$author_id . " AND languages_id = " . (int)$language_id);
$author = tep_db_fetch_array($author_query);
return $author['authors_seo_description'];
}

 

Notice: Trying to get property 'nodeValue' of non-object in /includes/functions/articles.php on line 338


function tep_get_articles_seo_description($article_id, $language_id = 0) {
global $languages_id;
-- line  338  --
if ($language_id == 0) $language_id = $languages_id;
$article_query = tep_db_query("SELECT articles_seo_description FROM articles_description WHERE articles_id = " . (int)$article_id . " AND language_id = " . (int)$language_id);
$article = tep_db_fetch_array($article_query);

return $article['articles_seo_description'];
}

Both errors indicate blank lines of code.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
1 hour ago, Fredi said:

in /includes/functions/articles.php on line 322

This doesn't match what I have here. And a search of all of the files is not returning the functions you mention. Maybe you are not using the latest Phoenix version of this addon?

Share this post


Link to post
Share on other sites

Thanks Jack, I'll check it out now.


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

 

uploads Your file:


182745.thumb.jpg.c7786b584a2a673d868c6e849affe2cd.jpg

 

 

Edited by Fredi

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

Fixed.   article_listing.php
2745.jpg.e3f5d2f49843e785c21c913319c46fb3.jpg

<?php
echo '<a class="main" href="' . tep_href_link($page, 'articles_id=' . $articles_listing['articles_id']) . '"><b>' . $articles_listing['articles_name'] . '</b></a> ';
if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['authors_name'])) {
 echo TEXT_BY_AM . ' ' . '<a href="' . tep_href_link('articles.php', 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';
}
?>

to -

<?php
echo '<a class="main" href="' . tep_href_link($page, 'articles_id=' . $articles_listing['articles_id']) . '"><b>' . $articles_listing['articles_name'] . '</b></a> ';
if (DISPLAY_AUTHOR_ARTICLE_LISTING == 'true' && tep_not_null($articles_listing['authors_name'])) {
 echo '<span class="article-line-caption">' . TEXT_BY_AM . '</span>' . '<a href="' . tep_href_link('articles.php', 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';
 }
?>

 


Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites
18 hours ago, Fredi said:

Fixed.   article_listing.php

What does this fix?

Share this post


Link to post
Share on other sites

Sorry,

Language constant 

echo TEXT_BY_AM . ' ' . '<a href="' . tep_href_link('articles.php', 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';

Work no correct.
27451.jpg.e7c5ddd459bdb1fa57755e4d1dd34422.jpg

I change code to:

 echo '<span class="article-line-caption">' . TEXT_BY_AM . '</span>' . '<a href="' . tep_href_link('articles.php', 'authors_id=' . $articles_listing['authors_id']) . '"> ' . $articles_listing['authors_name'] . '</a>';

add span class.

/includes/modules/article_manager/article_listing.php

line 24.

Edited by Fredi

Support forum for osCommerce in russian language - from Ashkelon. Support since 2002.

Best regards,

Fredi

Share this post


Link to post
Share on other sites

I understood what you changed. I was asking why you changed it? It displays fine for me the way I coded it.

Share this post


Link to post
Share on other sites

Using Phoenix 1.0.7.9

Was hoping it may work, but applying the changes - code not found

 

The /catalog/admin/maufacturers.php

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2020 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');

  $action = $_GET['action'] ?? '';

  $OSCOM_Hooks->call('manufacturers', 'preAction');

  if (tep_not_null($action)) {
    switch ($action) {
      case 'insert':
      case 'save':
        if (isset($_GET['mID'])) $manufacturers_id = tep_db_prepare_input($_GET['mID']);
        $manufacturers_name = tep_db_prepare_input($_POST['manufacturers_name']);

        $sql_data_array = ['manufacturers_name' => $manufacturers_name];

        if ($action == 'insert') {
          $insert_sql_data = ['date_added' => 'now()'];

          $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

          tep_db_perform('manufacturers', $sql_data_array);
          $manufacturers_id = tep_db_insert_id();
        } elseif ($action == 'save') {
          $update_sql_data = ['last_modified' => 'now()'];

          $sql_data_array = array_merge($sql_data_array, $update_sql_data);

          tep_db_perform('manufacturers', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "'");
        }

        $manufacturers_image = new upload('manufacturers_image');
        $manufacturers_image->set_destination(DIR_FS_CATALOG . 'images/');

        if ($manufacturers_image->parse() && $manufacturers_image->save()) {
          tep_db_query("update manufacturers set manufacturers_image = '" . tep_db_input($manufacturers_image->filename) . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
        }

        $languages = tep_get_languages();
        for ($i=0, $n=count($languages); $i<$n; $i++) {
          $manufacturers_url_array = $_POST['manufacturers_url'];
          /*** Begin Header Tags SEO ***/
          $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords'];         
          $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']);
          $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']);
          $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url'];
          $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']);
          $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag'];
          $manufacturers_htc_description_array = $_POST['manufacturers_htc_description'];
          $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text'];
          /*** End Header Tags SEO ***/ 
          $language_id = $languages[$i]['id'];

          $sql_data_array = ['manufacturers_url' => tep_db_prepare_input($manufacturers_url_array[$language_id])];
         /*** Begin Header Tags SEO ***/	  
          $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]);
          $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name);
          $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]);
          $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name));
          /*** End Header Tags SEO ***/  

          if ($action == 'insert') {
            $insert_sql_data = ['manufacturers_id' => $manufacturers_id, 'languages_id' => $language_id];

            $sql_data_array = array_merge($sql_data_array, $insert_sql_data);

            tep_db_perform('manufacturers_info', $sql_data_array);
          } elseif ($action == 'save') {
            tep_db_perform('manufacturers_info', $sql_data_array, 'update', "manufacturers_id = '" . (int)$manufacturers_id . "' and languages_id = '" . (int)$language_id . "'");
          }
        }

        $OSCOM_Hooks->call('manufacturers', 'insertSaveAction');

        tep_redirect(tep_href_link('manufacturers.php', (isset($_GET['page']) ? 'page=' . (int)$_GET['page'] . '&' : '') . 'mID=' . $manufacturers_id));
        break;
      case 'deleteconfirm':
        $manufacturers_id = tep_db_prepare_input($_GET['mID']);

        if (isset($_POST['delete_image']) && ($_POST['delete_image'] == 'on')) {
          $manufacturer_query = tep_db_query("select manufacturers_image from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'");
          $manufacturer = tep_db_fetch_array($manufacturer_query);

          $image_location = DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG . 'images/' . $manufacturer['manufacturers_image'];

          if (file_exists($image_location)) @unlink($image_location);
        }

        tep_db_query("delete from manufacturers where manufacturers_id = '" . (int)$manufacturers_id . "'");
        tep_db_query("delete from manufacturers_info where manufacturers_id = '" . (int)$manufacturers_id . "'");

        if (isset($_POST['delete_products']) && ($_POST['delete_products'] == 'on')) {
          $products_query = tep_db_query("select products_id from products where manufacturers_id = '" . (int)$manufacturers_id . "'");
          while ($products = tep_db_fetch_array($products_query)) {
            tep_remove_product($products['products_id']);
          }
        } else {
          tep_db_query("update products set manufacturers_id = '' where manufacturers_id = '" . (int)$manufacturers_id . "'");
        }

        $OSCOM_Hooks->call('manufacturers', 'deleteConfirmAction');

        tep_redirect(tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page']));
        break;
    }
  }

  $OSCOM_Hooks->call('manufacturers', 'postAction');

  require('includes/template_top.php');
?>

  <div class="row">
    <div class="col">
      <h1 class="display-4 mb-2"><?php echo HEADING_TITLE; ?></h1>
    </div>
    <div class="col text-right align-self-center">
      <?php
      if (empty($action)) {
        echo tep_draw_bootstrap_button(BUTTON_INSERT_NEW_MANUFACTURER, 'fas fa-id-card', tep_href_link('manufacturers.php', 'action=new'), null, null, 'btn-danger');
      }
      else {
        echo tep_draw_bootstrap_button(IMAGE_BACK, 'fas fa-angle-left', tep_href_link('manufacturers.php'), null, null, 'btn-light');
      }
      ?>
    </div>
  </div>

  <div class="row no-gutters">
    <div class="col-12 col-sm-8">
      <div class="table-responsive">
        <table class="table table-striped table-hover">
          <thead class="thead-dark">
            <tr>
              <th><?php echo TABLE_HEADING_MANUFACTURERS; ?></th>
              <th class="text-right"><?php echo TABLE_HEADING_ACTION; ?></th>
            </tr>
          </thead>
          <tbody>
            <?php
            $manufacturers_query_raw = "select * from manufacturers order by manufacturers_name";
            $manufacturers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $manufacturers_query_raw, $manufacturers_query_numrows);
            $manufacturers_query = tep_db_query($manufacturers_query_raw);
            while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
              if ((!isset($_GET['mID']) || (isset($_GET['mID']) && ($_GET['mID'] == $manufacturers['manufacturers_id']))) && !isset($mInfo) && (substr($action, 0, 3) != 'new')) {
                $manufacturer_products_query = tep_db_query("select count(*) as products_count from products where manufacturers_id = '" . (int)$manufacturers['manufacturers_id'] . "'");
                $manufacturer_products = tep_db_fetch_array($manufacturer_products_query);

                $mInfo_array = array_merge($manufacturers, $manufacturer_products);
                $mInfo = new objectInfo($mInfo_array);
              }

              if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) {
                echo '<tr class="table-active" onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id'] . '&action=edit') . '\'">';
              } else {
                echo '<tr onclick="document.location.href=\'' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$manufacturers['manufacturers_id']) . '\'">';
              }
              ?>
                <td><?php echo $manufacturers['manufacturers_name']; ?></td>
                <td class="text-right"><?php if (isset($mInfo) && is_object($mInfo) && ($manufacturers['manufacturers_id'] == $mInfo->manufacturers_id)) { echo '<i class="fas fa-chevron-circle-right text-info"></i>'; } else { echo '<a href="' . tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '"><i class="fas fa-info-circle text-muted"></i></a>'; } ?></td>
              </tr>
<?php
  }
?>
          </tbody>
        </table>
      </div>

      <div class="row my-1">
        <div class="col"><?php echo $manufacturers_split->display_count($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS); ?></div>
        <div class="col text-right mr-2"><?php echo $manufacturers_split->display_links($manufacturers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?></div>
      </div>
    </div>

<?php
  $heading = [];
  $contents = [];

  switch ($action) {
    case 'new':
      $heading[] = ['text' => TEXT_HEADING_NEW_MANUFACTURER];

      $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'action=insert', 'post', 'enctype="multipart/form-data"')];
      $contents[] = ['text' => TEXT_NEW_INTRO];
      $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name')];
      $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . TEXT_MANUFACTURERS_IMAGE_LABEL . '</label></div>'];

      $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = '';

      $languages = tep_get_languages();
      for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
        $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']') . '</div>';
        $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>';
        $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10') . '</div>';
        $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']') . '</div>';
      }

      $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string];
      $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string];
      $contents[] = ['text' => TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string];
      $contents[] = ['text' => TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string];
      $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php'), null, null, 'btn-light')];
      break;
    case 'edit':
      $heading[] = ['text' => TEXT_HEADING_EDIT_MANUFACTURER . ' <small>' . TEXT_EDIT_INTRO . '</small>'];

      $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=save', 'post', 'enctype="multipart/form-data"')];
      $contents[] = ['text' => TEXT_EDIT_INTRO];
      $contents[] = ['text' => TEXT_MANUFACTURERS_NAME . '<br>' . tep_draw_input_field('manufacturers_name', $mInfo->manufacturers_name)];
      $contents[] = ['text' => TEXT_MANUFACTURERS_IMAGE . '<br><div class="custom-file mb-2">' . tep_draw_input_field('manufacturers_image', '', 'id="inputManufacturersImage"', 'file', null, 'class="form-control-input"') . '<label class="custom-file-label" for="inputManufacturersImage">' . $mInfo->manufacturers_image . '</label></div>'];

      $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = '';
      $languages = tep_get_languages();
      for ($i=0, $n=sizeof($languages); $i<$n; $i++) {

        $manufacturer_inputs_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        $manufacturer_seo_title_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_title($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        $manufacturer_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
      }

      $contents[] = ['text' => TEXT_MANUFACTURERS_URL . $manufacturer_inputs_string];
      $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string];
      $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string];
      $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string];
      $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_SAVE, 'fas fa-save', null, 'primary', null, 'btn-success mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . (int)$mInfo->manufacturers_id), null, null, 'btn-light')];
      break;
    case 'delete':
      $heading[] = ['text' =>  TEXT_HEADING_DELETE_MANUFACTURER];

      $contents = ['form' => tep_draw_form('manufacturers', 'manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=deleteconfirm')];
      $contents[] = ['text' => TEXT_DELETE_INTRO];
      $contents[] = ['text' => '<strong>' . $mInfo->manufacturers_name . '</strong>'];
      $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_image', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteImg"') . '<label for="mDeleteImg" class="custom-control-label text-muted"><small>' . TEXT_DELETE_IMAGE . '</small></label></div>'];

      if ($mInfo->products_count > 0) {
        $contents[] = ['text' => '<div class="custom-control custom-switch">' . tep_draw_selection_field('delete_products', 'checkbox', 'on', null, 'class="custom-control-input" id="mDeleteProducts"') . '<label for="mDeleteProducts" class="custom-control-label text-muted"><small>' . TEXT_DELETE_PRODUCTS . '</small></label></div>'];
        $contents[] = ['text' => sprintf(TEXT_DELETE_WARNING_PRODUCTS, $mInfo->products_count)];
      }

      $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', null, 'primary', null, 'btn-danger mr-2') . tep_draw_bootstrap_button(IMAGE_CANCEL, 'fas fa-times', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id), null, null, 'btn-light')];
      break;
    default:
      if (isset($mInfo) && is_object($mInfo)) {
        $heading[] = ['text' => $mInfo->manufacturers_name];

        $contents[] = ['class' => 'text-center', 'text' => tep_draw_bootstrap_button(IMAGE_EDIT, 'fas fa-cogs', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=edit'), null, null, 'btn-warning mr-2') . tep_draw_bootstrap_button(IMAGE_DELETE, 'fas fa-trash', tep_href_link('manufacturers.php', 'page=' . (int)$_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=delete'), null, null, 'btn-danger')];
        $contents[] = ['text' => sprintf(TEXT_DATE_ADDED, tep_date_short($mInfo->date_added))];
        if (tep_not_null($mInfo->last_modified)) $contents[] = ['text' => sprintf(TEXT_LAST_MODIFIED, tep_date_short($mInfo->last_modified))];
        $contents[] = ['text' => tep_info_image($mInfo->manufacturers_image, $mInfo->manufacturers_name)];
        $contents[] = ['text' => sprintf(TEXT_PRODUCTS, $mInfo->products_count)];
      }
      break;
  }

  if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
    echo '<div class="col-12 col-sm-4">';
      $box = new box;
      echo $box->infoBox($heading, $contents);
    echo '</div>';
  }
?>

  </div>

  <script>$(document).on('change', '#inputManufacturersImage', function (event) { $(this).next('.custom-file-label').html(event.target.files[0].name); });</script>

<?php
  require('includes/template_bottom.php');
  require('includes/application_bottom.php');
?>

 

 

 

Instructions for changes - this and all code beyond has been changed in the file

FIND (around line 87 and again around line 125):

        if (USE_CACHE == 'true') {
          tep_reset_cache_block('manufacturers');
        }

 

 

 

Make the following changes to admin/manufacturers.php

FIND (about line 53):

          $manufacturers_description_array = $_POST['manufacturers_description'];
          $manufacturers_seo_description_array = $_POST['manufacturers_seo_description'];
          $manufacturers_seo_title_array = $_POST['manufacturers_seo_title'];

REPLACE WITH:

          /*** Begin Header Tags SEO ***/
          $manufacturers_seo_keywords_array = $_POST['manufacturers_seo_keywords'];         
          $manufacturers_htc_title_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag']);
          $manufacturers_htc_title_alt_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_title_tag_alt']);
          $manufacturers_htc_title_url_array = $_POST['manufacturers_htc_title_tag_url'];
          $manufacturers_htc_desc_array = str_replace('"', '&quot;',$_POST['manufacturers_htc_desc_tag']);
          $manufacturers_htc_keywords_array = $_POST['manufacturers_htc_keywords_tag'];
          $manufacturers_htc_description_array = $_POST['manufacturers_htc_description'];
          $manufacturers_htc_breadcrumb_array = $_POST['manufacturers_htc_breadcrumb_text'];
          /*** End Header Tags SEO ***/  
          
    -------------------------------------------------------------------------------
FIND (around line 63):

          $sql_data_array['manufacturers_description'] = tep_db_prepare_input($manufacturers_description_array[$language_id]);
          $sql_data_array['manufacturers_seo_description'] = tep_db_prepare_input($manufacturers_seo_description_array[$language_id]);
          $sql_data_array['manufacturers_seo_title'] = tep_db_prepare_input($manufacturers_seo_title_array[$language_id]);

REPLACE WITH:
	  
         /*** Begin Header Tags SEO ***/	  
          $sql_data_array['manufacturers_seo_keywords'] = tep_db_prepare_input($manufacturers_seo_keywords_array[$language_id]);
          $sql_data_array['manufacturers_htc_title_tag'] = (tep_not_null($manufacturers_htc_title_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_alt'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_alt_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_title_tag_url'] = (tep_not_null($manufacturers_htc_title_alt_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_title_url_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_desc_tag'] = (tep_not_null($manufacturers_htc_desc_array[$language_id]) ? tep_db_prepare_input($manufacturers_htc_desc_array[$language_id]) : $manufacturers_name);
          $sql_data_array['manufacturers_htc_keywords_tag'] = (tep_not_null($manufacturers_htc_keywords_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_keywords_array[$language_id])) : strip_tags($manufacturers_name));
          $sql_data_array['manufacturers_htc_description'] = tep_db_prepare_input($manufacturers_htc_description_array[$language_id]);
          $sql_data_array['manufacturers_htc_breadcrumb_text'] = (tep_not_null($manufacturers_htc_breadcrumb_array[$language_id]) ? tep_db_prepare_input(strip_tags($manufacturers_htc_breadcrumb_array[$language_id])) : strip_tags($manufacturers_name));
          /*** End Header Tags SEO ***/    

    -------------------------------------------------------------------------------
FIND (around line 87 and again around line 125):

        if (USE_CACHE == 'true') {
          tep_reset_cache_block('manufacturers');
        }

ADD BENEATH:

        /*** Begin Header Tags SEO ***/
        if (HEADER_TAGS_ENABLE_CACHE != 'None') {
          require_once(DIR_WS_FUNCTIONS . 'header_tags.php');
          ResetCache_HeaderTags('index.php', 'm_' . $manufacturers_id);
        }
        /*** End Header Tags SEO ***/

    -------------------------------------------------------------------------------
FIND (around line 156):

  $manufacturers_query_raw = "select manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified from manufacturers order by manufacturers_name";

REPLACE WITH:

  /*** Begin Header Tags SEO ***/
  $manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_htc_title_tag, mi.manufacturers_htc_title_tag_alt, mi.manufacturers_htc_title_tag_url from manufacturers m LEFT JOIN manufacturers_info mi on m.manufacturers_id = mi.manufacturers_id where mi.languages_id = '".$languages_id ."' order by m.manufacturers_name";
  /*** End Header Tags SEO ***/

    -------------------------------------------------------------------------------
FIND (around line 213):

      $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = '';

      $languages = tep_get_languages();
      for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
        $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');
        $manufacturer_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10');
        $manufacturer_seo_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10');
        $manufacturer_seo_title_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_title[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;"');

REPLACE WITH:

      $manufacturer_inputs_string = '';

      $languages = tep_get_languages();
      for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
        $manufacturer_inputs_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_url[' . $languages[$i]['id'] . ']');
	
        /*** Begin Header Tags SEO ***/ 
        $manufacturer_seo_keywords_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', NULL, 'style="width: 300px;" placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"');
        $manufacturer_htc_title_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag[' . $languages[$i]['id'] . ']');
        $manufacturer_htc_title_alt_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']');
        $manufacturer_htc_title_url_string .= '<br />' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']');
        $manufacturer_htc_breadcrumb_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']');
        $manufacturer_htc_desc_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_desc_tag[' . $languages[$i]['id'] . ']');
        $manufacturer_htc_keywords_string .= '<br>' . tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . tep_draw_input_field('manufacturers_htc_keywords_tag[' . $languages[$i]['id'] . ']');
        
        if (HEADER_TAGS_ENABLE_HTML_EDITOR == 'No Editor' || HEADER_TAGS_ENABLE_EDITOR_MANUFACTURERS == 'false') {
            $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_field('manufacturers_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10');
        } else {
            $manufacturer_htc_description_string .= '<br />' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '&nbsp;' . tep_draw_textarea_ckeditor('manufacturers_description[' . $languages[$i]['id'] . ']', '80', '10');
        }
        /*** End Header Tags SEO ***/

    -------------------------------------------------------------------------------
FIND (around line 235):

      $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_TITLE . $manufacturer_seo_title_string);
      $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_DESCRIPTION . $manufacturer_description_string);
      $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string);

REPLACE WITH:

      /*** Begin Header Tags SEO ***/
      $contents[] = array('text' => '<br />' . TEXT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title' . $manufacturer_htc_title_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title Alt' . $manufacturer_htc_title_alt_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Title URL' . $manufacturer_htc_title_url_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Breadcrumb' . $manufacturer_htc_breadcrumb_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_desc_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Keywords' . $manufacturer_htc_keywords_string);
      $contents[] = array('text' => '<br />' . 'Header Tags Manufacturer Description' . $manufacturer_htc_description_string);
      /*** End Header Tags SEO ***/

    -------------------------------------------------------------------------------
FIND (around line 254):

      $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_title_string = '';

REPLACE WITH:

      /*** Begin Header Tags SEO ***/ 
      $manufacturer_inputs_string = $manufacturer_description_string = $manufacturer_seo_description_string = $manufacturer_seo_keywords_string = $manufacturer_seo_title_string = '';
      /*** End Header Tags SEO ***/ 
      
    -------------------------------------------------------------------------------
FIND (around line 254):
      
        $manufacturer_seo_description_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name'], '', '', 'style="vertical-align: top;"') . '</span></div>' . tep_draw_textarea_field('manufacturers_seo_description[' . $languages[$i]['id'] . ']', 'soft', '80', '10', tep_get_manufacturer_seo_description($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';

ADD BENEATH:      
      
        /*** Begin Header Tags SEO ***/ 
        $manufacturer_seo_keywords_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_seo_keywords[' . $languages[$i]['id'] . ']', tep_get_manufacturer_seo_keywords($mInfo->manufacturers_id, $languages[$i]['id']), 'placeholder="' . PLACEHOLDER_COMMA_SEPARATION . '"') . '</div>';
        $manufacturer_htc_title_alt_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_alt[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_alt($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        $manufacturer_htc_title_url_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_title_tag_url[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_title_url($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        $manufacturer_htc_breadcrumb_string .= '<div class="input-group"><div class="input-group-prepend"><span class="input-group-text">' . tep_image(tep_catalog_href_link('includes/languages/' . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], '', 'SSL'), $languages[$i]['name']) . '</span></div>' . tep_draw_input_field('manufacturers_htc_breadcrumb_text[' . $languages[$i]['id'] . ']', tep_get_manufacturer_htc_breadcrumb($mInfo->manufacturers_id, $languages[$i]['id'])) . '</div>';
        /*** End Header Tags SEO ***/

    -------------------------------------------------------------------------------
FIND (around line 276):

      $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_DESCRIPTION . $manufacturer_seo_description_string];

ADD BENEATH:

      /*** Begin Header Tags SEO ***/
      $contents[] = ['text' => TEXT_EDIT_MANUFACTURERS_SEO_KEYWORDS . $manufacturer_seo_keywords_string];
      $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_ALT . $manufacturer_htc_title_alt_string];
      $contents[] = ['text' => TEXT_HEADERTAGS_TITLE_URL . $manufacturer_htc_title_url_string];
      $contents[] = ['text' => TEXT_HEADERTAGS_BREADCRUMB . $manufacturer_htc_breadcrumb_string];
      /*** End Header Tags SEO ***/
      
===================================================================
That's all ;-)

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

TROUBLESHOOTING:

1 - The tools in the admin section have to be able to write to the
include/header_tags.php file. In order to do that, the permissions
for that file must be set correctly. If Header Tags thinks the permissions
are not set correctly, it will display a warning message with what it thinks
are the proper permissions. You will need to change those permissions using
an ftp program (right click and choose chmod) or by using your hosts control
panel. The permissions should, typically, be set to 755 (777 for some
servers). If you do not know what this is or how to do it, ask your host to
help you.

2 - Some hosts restrict a function used in
catalog/admin/includes/functions/header_tags.php. If you get an error regarding
the chmod() php function in this file, like:

Warning: chmod(): Operation not permitted in ...
Cannot change the mode of file (../includes/header_tags.php)

and you have addressed the file permissions settings as stated above, you may
have to comment out the function. To do that,
 OPEN: admin/includes/functions/header_tags.php

  Around line 201 you find this code:

  if (!is_writable($filename))
  {
     if (!chmod($filename, 0666)) {
        echo "Cannot change the mode of file ($filename)";
        exit;
     }
  }

  Replace that with the following code:

  if (!is_writable($filename))
  {
    echo "The file isn't writable";
	exit;
     /* if (!chmod($filename, 0666)) {
        echo "Cannot change the mode of file ($filename)";
        exit;
     } */
  }

 

Share this post


Link to post
Share on other sites
5 hours ago, Dnj1964 said:

Was hoping it may work, but applying the changes - code not found

I don't know what this means. Are you saying there isn't a manufacturers file? Also, please don't post such long pieces of code unless asked for. They make the problem very difficult to understand.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×