Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

The latest version shouldn't have this problem so be sure you are using my latest version. If you are, you could look back through the thread since this has been addressed several times. Maybe on of those posts will help.

 

Latest version was installed, still the problem was there. Sweeped thru the forum and found that if there is an empty row in the topics table it has to be deleted!

 

So for all others which encounter similar problems - go on phpmyadmin or sth similar on your database and put the sql command

SELECT *
FROM `topics`
LIMIT 0 , 30

 

if there is an empty row in your database, delete this one - then it works!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Hi Guys,

 

New to OScommerce.

 

Installed this addin and have following error when trying to add author:

 

 

"

Fatal error: Call to undefined function tep_hide_session_id() in /usr/www/users/iwjdes/oldsite/admin/authors.php on line 190

"

innocent.gif

 

Any pointer greatly appreciated!!

Link to comment
Share on other sites

Hi Guys,

 

New to OScommerce.

 

Installed this addin and have following error when trying to add author:

 

 

"

Fatal error: Call to undefined function tep_hide_session_id() in /usr/www/users/iwjdes/oldsite/admin/authors.php on line 190

"

innocent.gif

 

Any pointer greatly appreciated!!

That's a standard function in oscommerce except in very old versions. To fix it, add the following in the admin/includes/functions/html_output.php before the last ?>

////
// Hide form elements
 function tep_hide_session_id() {
   $string = '';
   if (defined('SID') && tep_not_null(SID)) {
  $string = tep_draw_hidden_field(tep_session_name(), tep_session_id());
   }
   return $string;
 }

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...

Slogging my way through the changes from 2.2 to 2.3, and reinstalling all the packages I had on my pre-existing site. I think I have everything up and running properly, but when I get to the tell-a-friend function, the email never sends - the page is an endless loop of hitting continue, and never moves beyond that.

 

I will say the stock code on this page was the one that least lined up with the instructions (difference between the 2.2 code and the new themeroller part of 2.3, I believe), so it wouldn't surprise me if I mis-coded something, but everything else appears to be working properly so I wondered what I might have missed. No error message is delivered, just when you click "Continue" it just refreshes the page.

Link to comment
Share on other sites

I will say the stock code on this page was the one that least lined up with the instructions (difference between the 2.2 code and the new themeroller part of 2.3, I believe), so it wouldn't surprise me if I mis-coded something, but everything else appears to be working properly so I wondered what I might have missed. No error message is delivered, just when you click "Continue" it just refreshes the page.

There is a completed file in the package that you can compare your changes against or, if your template doesn't add much to the file, it could just be used as is.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

I have my back-up file of it, but I might see what happens if I just replace the completed file from the package with the one I'm currently using. I don't think any of my other contribs I have installed affected that page at all (except possibly Header Tags?), but I'd need to verify. Also found a bug on that page on my site in the breadcrumbs (shows the product name, doesn't show the article name) - it seems where-ever it's asked to choose between article or product on this page is where it's freaking out. (And possibly related - if you aren't logged in when you attempt to tell-a-friend, and have to log in to do so, it loses the article name.)

 

I'll upload the file from the package and see what happens.

Link to comment
Share on other sites

Just tried the file straight from the contribution - I get the message "Product not found!" when I try to tell-a-friend from the article with that file. If I hit the continue button from there, it takes me back to my home page.

Link to comment
Share on other sites

I figured out why the file straight from the contribution doesn't work - it's not edited in any way. There's no addition of the article manager code to it. I re-downloaded the contribution to verify, but it is indeed the un-altered file from an initial install of 2.3.1 rather than a file with the code added to it.

Link to comment
Share on other sites

Okay - and figured out why it was not sending. The form code has changed with the new buttons. You have that it should be:

<!-- body_text //-->
<?php /**** BEGIN ARTICLE MANAGER ****/ ?>
<td width="100%" valign="top">
<?php
  // Modify form processing depending on whether product or article
  if ($valid_product) {
	echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&products_id=' . $HTTP_GET_VARS['products_id']));
	} else if ($valid_article) {
	  echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&articles_id=' . $HTTP_GET_VARS['articles_id']));
  }
?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading">
		<?php
		  // Modify heading depending on whether product or article
		  if ($valid_product) {
			 $title = $product_info['products_name'];
			 } else if ($valid_article) {
			   $title = $article_info['articles_name'];
		  }
		  echo sprintf(HEADING_TITLE, $title);
		?>
		 </td>
  <?php /**** END ARTICLE MANAGER ****/ ?>

 

and with the new forms and buttons, it should be:

 


<h1><?php  // Modify heading depending on whether product or article
		  if ($valid_product) {
			 $title = $product_info['products_name'];
			 } else if ($valid_article) {
			   $title = $article_info['articles_name'];
		  }
		  echo sprintf(HEADING_TITLE, $title);
		?>
</h1>

<?php
 if ($messageStack->size('friend') > 0) {
echo $messageStack->output('friend');
 }
?>

<?php
  // Modify form processing depending on whether product or article - Article Manager
  if ($valid_product) {
	echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&products_id=' . (int)$HTTP_GET_VARS['products_id']), 'post', '', true);
	}
else if ($valid_article) {
	echo tep_draw_form('email_friend', tep_href_link(FILENAME_TELL_A_FRIEND, 'action=process&articles_id=' . (int)$HTTP_GET_VARS['articles_id']), 'post', '', true);
  } // End Article Manager
?>

 

Likewise, the back button code has changed. You have:

 <td><?php
				/**** BEGIN ARTICLE MANAGER ****/
				// Modify back button depending on whether product or article
				if ($valid_product) {
				  echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';
				  } else if ($valid_article) {
					echo '<a href="' . tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . $HTTP_GET_VARS['articles_id']) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>';
				}
				/**** END ARTICLE MANAGER ****/
				   ?></td>

 

And with the new buttons, it needs to be:

 <?php  /**** BEGIN ARTICLE MANAGER ****/
   // Modify back button depending on whether product or article
				if ($valid_product) {
				  echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . (int)$HTTP_GET_VARS['products_id']));
				  } else if ($valid_article) {
echo tep_draw_button(IMAGE_BUTTON_BACK, 'triangle-1-w', tep_href_link(FILENAME_ARTICLE_INFO, 'articles_id=' . (int)$HTTP_GET_VARS['products_id']));					  
				}
				/**** END ARTICLE MANAGER ****/
				   ?>

 

Hope this helps, and thanks for bearing with me!

Edited by akansan
Link to comment
Share on other sites

Thank you for posting the fixes. I must not have included the file I tested with in the package. Your posting should help others.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Back again with another fix, sorry. When I have the Article Manager box enabled in a side column, IE 7+ (checked in both IE 7 and IE 9) refuses to display that column. It appears to be an issue with how the styles are defined in the bm_articles.php file. I moved those styles to stylesheet.css and the problems resolved itself.

 

The problem code:

 

 

<style type="text/css">
     .separatorArticle {
     height: 1px;
     color: #FF0000;
     }
     .separatorBlogArticle {
     height: 1px;
     color: #FF0000;
     }
     .separatorNewArticle {
     height: 1px;
     color: #FF0000;
     }
     .separatorTopic {
     height: 1px;
     color: #FF0000;
     }
     </style>

 

This bit of code is placed above the head tag in IE, which breaks the page.

Link to comment
Share on other sites

I have both the latest versions of Header Tags SEO and Article Manager. Great work as always Jack.

 

Anyway when I try to update the tags for an article in page control It only updates them to the default pages. It works fine when I edit products and add them in categories.php. There doesn't seam to be a way to edit in the article description except for the meta description.

 

Am I doing something wrong or am I trying to do it from the wrong place?

 

articlespagecontrol.jpg

 

 

Here is a link to the page

 

http://absolutelysco...outing-a-1.html

Edited by IWAS
Link to comment
Share on other sites

I have both the latest versions of Header Tags SEO and Article Manager. Great work as always Jack.

 

Anyway when I try to update the tags for an article in page control It only updates them to the default pages. It works fine when I edit products and add them in categories.php. There doesn't seam to be a way to edit in the article description except for the meta description.

 

Am I doing something wrong or am I trying to do it from the wrong place?

 

articlespagecontrol.jpg

 

 

Here is a link to the page

 

http://absolutelysco...outing-a-1.html

Header Tags is only meant to control the title and tags for articles. For regular text, you use Article Manager section in admin.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Header Tags is only meant to control the title and tags for articles. For regular text, you use Article Manager section in admin.

I think that's what I am talking about, it is not updating the header tags for the article. The screen shot shows that I entered the stuff in the header tags for keywords and title for that article, and the only thing showing up in the articles header tags is default title & default keywords.

 

Even when I click on the preview checkbox it goes to the default title and default keywords (also in the screenshot).

 

When I repull this up from a fresh login, using the dropdown select an option, It still displays it like the screen shot, so it is obviously storing it in the database, but if you view source of the article it is Default title and default keywords default description listed in the meta tags.

 

http://insightwas.com/images/articlespagecontrol.jpg Screenshot of header tags for the article

 

http://absolutelyscooterparts.net/catalog/hose-routing-a-1.html Actual article page

Edited by IWAS
Link to comment
Share on other sites

I think that's what I am talking about, it is not updating the header tags for the article. The screen shot shows that I entered the stuff in the header tags for keywords and title for that article, and the only thing showing up in the articles header tags is default title & default keywords.

 

Even when I click on the preview checkbox it goes to the default title and default keywords (also in the screenshot).

 

When I repull this up from a fresh login, using the dropdown select an option, It still displays it like the screen shot, so it is obviously storing it in the database, but if you view source of the article it is Default title and default keywords default description listed in the meta tags.

 

http://insightwas.co...pagecontrol.jpg Screenshot of header tags for the article

 

http://absolutelysco...outing-a-1.html Actual article page

The preview button won't work for pseudo pages. The only thing I can think of is that the includes/header_tags.php file is not writeable. When you add a pseudo page a special piece of code is added to that file. If it is not writeable, that code won't get added. You should look in that file for the article info section. Compare it to some other page, like privacy, and you should see a big difference.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The preview button won't work for pseudo pages. The only thing I can think of is that the includes/header_tags.php file is not writeable. When you add a pseudo page a special piece of code is added to that file. If it is not writeable, that code won't get added. You should look in that file for the article info section. Compare it to some other page, like privacy, and you should see a big difference.

 

 

Permissions for includes/header_tags is 755

 

Here is the contents.

 

<?php

/*

 

// article_info.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_INFO):

$page = 'article_info.php?articles_id=';

$parts = explode("?",$page);

$getStr = substr($parts[1], 0, -1);

$getID = isset($_GET[$getStr]) ? $_GET[$getStr] : '';

$parts = explode("=", $parts[1]);

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID)) {

if (isset($parts[0])) {

$found = false;

$name = FILENAME_ARTICLE_INFO . "?" . $parts[0] . "=";

$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $name . "%' and language_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($pageTags_query) > 0) {

while($pageTags = tep_db_fetch_array($pageTags_query)) {

if ($name . $_GET[$parts[0]] === $pageTags['page_name']) {

$header_tags_array = tep_header_tag_page($pageTags['page_name']);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

$found = true;

break;

} } }

if (! $found) {

$found = true;

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_INFO);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

} } else {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_INFO);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

}

$page = 'articles.php?tPath=';

$parts = explode("?",$page);

$getStr = substr($parts[1], 0, -1);

$getID = isset($_GET[$getStr]) ? $_GET[$getStr] : '';

$parts = explode("=", $parts[1]);

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID)) {

if (isset($parts[0])) {

$found = false;

$name = FILENAME_ARTICLES . "?" . $parts[0] . "=";

$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $name . "%' and language_id = '" . (int)$languages_id . "'");

if (tep_db_num_rows($pageTags_query) > 0) {

while($pageTags = tep_db_fetch_array($pageTags_query)) {

if ($name . $_GET[$parts[0]] === $pageTags['page_name']) {

$header_tags_array = tep_header_tag_page($pageTags['page_name']);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

$found = true;

break;

} } }

if (! $found) {

$found = true;

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLES);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

} } else {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLES);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $getID);

}

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

Portions Copyright 2009 oscommerce-solution.com

 

Released under the GNU General Public License

*/

 

require_once(DIR_WS_FUNCTIONS . 'header_tags.php');

require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); // Clean out HTML comments from ALT tags etc.

 

$cache_output = '';

$canonical_url = '';

$header_tags_array = array();

$sortOrder = array();

$tmpTags = array();

 

$defaultTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS_DEFAULT . " where language_id = '" . (int)$languages_id . "'");

$defaultTags = tep_db_fetch_array($defaultTags_query);

$tmpTags['def_title'] = (tep_not_null($defaultTags['default_title'])) ? $defaultTags['default_title'] : '';

$tmpTags['def_desc'] = (tep_not_null($defaultTags['default_description'])) ? $defaultTags['default_description'] : '';

$tmpTags['def_keywords'] = (tep_not_null($defaultTags['default_keywords'])) ? $defaultTags['default_keywords'] : '';

$tmpTags['def_logo_text'] = (tep_not_null($defaultTags['default_logo_text'])) ? $defaultTags['default_logo_text'] : '';

 

// Define specific settings per page:

switch (true) {

// INDEX.PHP

case (basename($_SERVER['PHP_SELF']) === FILENAME_DEFAULT):

$id = ($current_category_id ? 'c_' . (int)$current_category_id : (($_GET['manufacturers_id'] ? 'm_' . (int)$_GET['manufacturers_id'] : '')));

 

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $id))

{

$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . FILENAME_DEFAULT . "' and language_id = '" . (int)$languages_id . "'");

$pageTags = tep_db_fetch_array($pageTags_query);

 

$catStr = "select categories_htc_title_tag as htc_title_tag, categories_htc_desc_tag as htc_desc_tag, categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "' limit 1";

$manStr = '';

if (isset($_GET['manufacturers_id']) && $category_depth == 'top')

$manStr = "select mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "' limit 1";

 

if ($pageTags['append_root'] || $category_depth == 'top' && ! isset($_GET['manufacturers_id']) )

{

$sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];

$sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];

$sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];

$sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];

$sortOrder['logo_1'][$pageTags['sortorder_root_1']] = $pageTags['page_logo_1'];

$sortOrder['logo_2'][$pageTags['sortorder_root_2']] = $pageTags['page_logo_2'];

$sortOrder['logo_3'][$pageTags['sortorder_root_3']] = $pageTags['page_logo_3'];

$sortOrder['logo_4'][$pageTags['sortorder_root_4']] = $pageTags['page_logo_4'];

}

 

$sortOrder = GetCategoryAndManufacturer($sortOrder, $pageTags, $defaultTags, $catStr, $manStr);

 

if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];

if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];

if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];

if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text'])) $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

 

FillHeaderTagsArray($header_tags_array, $sortOrder);

 

// Canonical URL add-on

if (tep_not_null($cPath) || (isset($_GET['manufacturers_id']) && $category_depth == 'top'))

{

$args = tep_get_all_get_params(array('action','currency', tep_session_name(),'sort','page'));

$canonical_url = StripSID(tep_href_link(FILENAME_DEFAULT, $args, 'NONSSL', false) );

}

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $id);

}

break;

 

// PRODUCT_INFO.PHP

// PRODUCT_REVIEWS.PHP

// PRODUCT_REVIEWS_INFO.PHP

// PRODUCT_REVIEWS_WRITE.PHP

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO):

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS):

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO):

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE):

 

switch (true)

{

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_INFO): $filename = FILENAME_PRODUCT_INFO; break;

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS): $filename = FILENAME_PRODUCT_REVIEWS; break;

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_INFO): $filename = FILENAME_PRODUCT_REVIEWS_INFO; break;

case (basename($_SERVER['PHP_SELF']) === FILENAME_PRODUCT_REVIEWS_WRITE): $filename = FILENAME_PRODUCT_REVIEWS_WRITE; break;

default: $filename = FILENAME_PRODUCT_INFO;

}

 

$id = ($_GET['products_id'] ? 'p_' . (int)$_GET['products_id'] : '');

 

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $id))

{

$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . $filename . "' and language_id = '" . (int)$languages_id . "'");

$pageTags = tep_db_fetch_array($pageTags_query);

 

$the_product_info_query = tep_db_query("select p.products_id, pd.products_head_title_tag, pd.products_head_keywords_tag, pd.products_head_desc_tag, p.manufacturers_id, p.products_model from " . TABLE_PRODUCTS . " p inner join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id ='" . (int)$languages_id . "' limit 1");

$the_product_info = tep_db_fetch_array($the_product_info_query);

$header_tags_array['product'] = $the_product_info['products_head_title_tag']; //save for use on the logo

$tmpTags['prod_title'] = (tep_not_null($the_product_info['products_head_title_tag'])) ? $the_product_info['products_head_title_tag'] : '';

$tmpTags['prod_desc'] = (tep_not_null($the_product_info['products_head_desc_tag'])) ? $the_product_info['products_head_desc_tag'] : '';

$tmpTags['prod_keywords'] = (tep_not_null($the_product_info['products_head_keywords_tag'])) ? $the_product_info['products_head_keywords_tag'] : '';

$tmpTags['prod_model'] = (tep_not_null($the_product_info['products_model'])) ? $the_product_info['products_model'] : '';

 

$catStr = "select c.categories_htc_title_tag as htc_title_tag, c.categories_htc_desc_tag as htc_desc_tag, c.categories_htc_keywords_tag as htc_keywords_tag from " . TABLE_CATEGORIES_DESCRIPTION . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_id = p2c.categories_id and p2c.products_id = '" . (int)$the_product_info['products_id'] . "' and language_id = '" . (int)$languages_id . "'";

$manStr = "select mi.manufacturers_htc_title_tag as htc_title_tag, mi.manufacturers_htc_desc_tag as htc_desc_tag, mi.manufacturers_htc_keywords_tag as htc_keywords_tag from " . TABLE_MANUFACTURERS . " m LEFT JOIN " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$the_product_info['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "' LIMIT 1";

 

if ($pageTags['append_root'])

{

$sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];

$sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];

$sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];

$sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];

$sortOrder['logo_1'][$pageTags['sortorder_root_1']] = $pageTags['page_logo_1'];

$sortOrder['logo_2'][$pageTags['sortorder_root_2']] = $pageTags['page_logo_2'];

$sortOrder['logo_3'][$pageTags['sortorder_root_3']] = $pageTags['page_logo_3'];

$sortOrder['logo_4'][$pageTags['sortorder_root_4']] = $pageTags['page_logo_4'];

}

 

if ($pageTags['append_product'])

{

$sortOrder['title'][$pageTags['sortorder_product']] = $tmpTags['prod_title']; //places the product title at the end of the list

$sortOrder['description'][$pageTags['sortorder_product']] = $tmpTags['prod_desc'];

$sortOrder['keywords'][$pageTags['sortorder_product']] = $tmpTags['prod_keywords'];

$sortOrder['logo'][$pageTags['sortorder_product']] = $tmpTags['prod_title'];

}

 

if ($pageTags['append_model'])

{

$sortOrder['title'][$pageTags['sortorder_model']] = $tmpTags['prod_model']; //places the product title at the end of the list

$sortOrder['description'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];

$sortOrder['keywords'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];

$sortOrder['logo'][$pageTags['sortorder_model']] = $tmpTags['prod_model'];

}

 

$sortOrder = GetCategoryAndManufacturer($sortOrder, $pageTags, $defaultTags, $catStr, $manStr, true);

 

if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];

if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];

if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];

if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text'])) $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

 

FillHeaderTagsArray($header_tags_array, $sortOrder);

 

// Canonical URL add-on

if ($_GET['products_id'] != '') {

$canonical_url = StripSID(tep_href_link(basename($_SERVER['PHP_SELF']), 'products_id='.(int)$_GET['products_id']));

}

 

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, $id);

}

break;

 

// SPECIALS.PHP

case (basename($_SERVER['PHP_SELF']) === FILENAME_SPECIALS):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, ''))

{

$pageTags_query = tep_db_query("select * from " . TABLE_HEADERTAGS . " where page_name like '" . FILENAME_SPECIALS . "' and language_id = '" . (int)$languages_id . "'");

$pageTags = tep_db_fetch_array($pageTags_query);

 

// Build a list of ALL specials product names to put in keywords

$new = tep_db_query("select p.products_id, pd.products_name, p.products_price, p.products_tax_class_id, p.products_image, s.specials_new_products_price from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_SPECIALS . " s where p.products_status = '1' and s.products_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and s.status = '1' order by s.specials_date_added DESC ");

$row = 0;

$the_specials='';

while ($new_values = tep_db_fetch_array($new)) {

$the_specials .= clean_html_comments($new_values['products_name']) . ', ';

}

 

if (strlen($the_specials) > 30000) //arbitrary number - may vary with server setting

$the_specials = substr($the_specials, 0, 30000); //adjust as needed

 

if ($pageTags['append_root'])

{

$sortOrder['title'][$pageTags['sortorder_root']] = $pageTags['page_title'];

$sortOrder['description'][$pageTags['sortorder_root']] = $pageTags['page_description'];

$sortOrder['keywords'][$pageTags['sortorder_root']] = $pageTags['page_keywords'];

$sortOrder['logo'][$pageTags['sortorder_root']] = $pageTags['page_logo'];

$sortOrder['logo_1'][$pageTags['sortorder_root']] = $pageTags['page_logo_1'];

$sortOrder['logo_2'][$pageTags['sortorder_root']] = $pageTags['page_logo_2'];

$sortOrder['logo_3'][$pageTags['sortorder_root']] = $pageTags['page_logo_3'];

$sortOrder['logo_4'][$pageTags['sortorder_root']] = $pageTags['page_logo_4'];

}

 

$sortOrder['keywords'][10] = $the_specials;;

 

if ($pageTags['append_default_title'] && tep_not_null($tmpTags['def_title'])) $sortOrder['title'][$pageTags['sortorder_title']] = $tmpTags['def_title'];

if ($pageTags['append_default_description'] && tep_not_null($tmpTags['def_desc'])) $sortOrder['description'][$pageTags['sortorder_description']] = $tmpTags['def_desc'];

if ($pageTags['append_default_keywords'] && tep_not_null($tmpTags['def_keywords'])) $sortOrder['keywords'][$pageTags['sortorder_keywords']] = $tmpTags['def_keywords'];

if ($pageTags['append_default_logo'] && tep_not_null($tmpTags['def_logo_text'])) $sortOrder['logo'][$pageTags['sortorder_logo']] = $tmpTags['def_logo_text'];

 

FillHeaderTagsArray($header_tags_array, $sortOrder);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// article-topics.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_TOPICS):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_TOPICS);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// article_blog.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_BLOG):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_BLOG);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// articles_new.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLES_NEW):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLES_NEW);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// article_reviews.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_REVIEWS):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_REVIEWS);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// article_reviews_write.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_REVIEWS_WRITE):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_REVIEWS_WRITE);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// article_reviews_info.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLE_REVIEWS_INFO):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLE_REVIEWS_INFO);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// articles.php

case (basename($_SERVER['PHP_SELF']) === FILENAME_ARTICLES):

if (! ReadCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '')) {

$header_tags_array = tep_header_tag_page(FILENAME_ARTICLES);

WriteCacheHeaderTags($header_tags_array, basename($_SERVER['PHP_SELF']), $language, '');

}

break;

 

// ALL OTHER PAGES NOT DEFINED ABOVE

default:

$header_tags_array['title'] = tep_db_prepare_input($defaultTags['default_title']);

$header_tags_array['desc'] = tep_db_prepare_input($defaultTags['default_description']);

$header_tags_array['keywords'] = tep_db_prepare_input($defaultTags['default_keywords']);

break;

}

 

echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '" >'."\n";

echo ' <title>' . $header_tags_array['title'] . '</title>' . "\n";

echo ' <meta name="Description" content="' . $header_tags_array['desc'] . '" >' . "\n";

echo ' <meta name="Keywords" content="' . $header_tags_array['keywords'] . '" >' . "\n";

 

if ($defaultTags['meta_language']) { $langName = explode(",", $_SERVER["HTTP_ACCEPT_LANGUAGE"]); echo ' <meta http-equiv="Content-Language" content="' . $langName[0] . '" >'."\n"; }

if ($defaultTags['meta_google']) echo ' <meta name="googlebot" content="all" >' . "\n";

if ($defaultTags['meta_noodp']) echo ' <meta name="robots" content="noodp" >' . "\n";

if ($defaultTags['meta_noydir']) echo ' <meta name="slurp" content="noydir" >' . "\n";

if ($defaultTags['meta_revisit']) echo ' <meta name="revisit-after" content="1 days" >' . "\n";

if ($defaultTags['meta_robots']) echo ' <meta name="robots" content="index, follow" >' . "\n";

if ($defaultTags['meta_unspam']) echo ' <meta name="no-email-collection" value="' . HTTP_SERVER . '" >' . "\n";

if ($defaultTags['meta_replyto']) echo ' <meta name="Reply-to" content="' . STORE_OWNER_EMAIL_ADDRESS . '">' . "\n";

if ($defaultTags['meta_canonical']) echo (tep_not_null($canonical_url) ? ' <link rel="canonical" href="'.$canonical_url.'" >'. "\n" : ' <link rel="canonical" href="'.GetCanonicalURL().'" >'. "\n");

 

echo '<!-- EOF: Header Tags SEO Generated Meta Tags -->' . "\n";

?>

Link to comment
Share on other sites

 

 

Permissions for includes/header_tags is 755

 

Here is the contents.

The entries for the articles section are incorrect. You'll need to replace that file, or delete all of the article manager related section and re-enter them in admin.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

The entries for the articles section are incorrect. You'll need to replace that file, or delete all of the article manager related section and re-enter them in admin.

I replaced the entire file with the stock one. Now I get for a title and for keywords Article Info - Default Title and description is totally blank on the page itself. Before it was just the Default title without the " Article Info" The items I entered before still show up as they did in the screenshot for page control in admin, so I know they are in the database, they are just not getting written to the page displayed.

 

http://absolutelyscooterparts.net/catalog/hose-routing-a-1.html

Link to comment
Share on other sites

I tried this but had issue after issue and spent almost 2 hours digging through pages of solutions here. In the end it still didn't properly work and waste of my time so I removed it. Maybe, back to the drawing board on this one.

Link to comment
Share on other sites

I replaced the entire file with the stock one. Now I get for a title and for keywords Article Info - Default Title and description is totally blank on the page itself. Before it was just the Default title without the " Article Info" The items I entered before still show up as they did in the screenshot for page control in admin, so I know they are in the database, they are just not getting written to the page displayed.

 

http://absolutelysco...outing-a-1.html

And did you re-enter the pages in page control after replacing the file. Did you look at the file again to see if the correct code is there?

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

And did you re-enter the pages in page control after replacing the file. Did you look at the file again to see if the correct code is there?

Yes, still doesn't work. Like I said it shows up in page control, just doesn't get attached to the page when called from a browser.

 

 

With products_info everything works fine. I even got easypopulate to fill those tags. It is just the articles.

Link to comment
Share on other sites

Does this help, ran the test --- see it probably is something I am doing wrong

 

Missing Code in File explain

 

The Header Tags head code for the product_reviews.php file cannot be found.

The Header Tags head code for the product_reviews_info.php file cannot be found.

The Header Tags head code for the product_reviews_write.php file cannot be found.

The Header Tags head code for the specials.php file cannot be found.

 

Missing Pseudo Code Error: explain

The file article-topics.php should have pseudo code entries but does not.

 

languages in the Header Tags table are: 1 ( English ).

languages in the Header Tags table are: 3 ( Español ).

Title and Meta Tag results for article_info.php explain

English

 

From Site:

Title -> Article Info - Default title

Meta Description ->

Meta Keywords -> Article Info , Default Keywords

 

 

From Settings:

Title ->

Meta Description ->

Meta Keywords ->

 

Results of scan:

 

article_info.php is missing data. Fill Tags should be ran.

 

 

 

How can I run fill tags for the articles, the only thing that shows up is products and categories ?

Edited by IWAS
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...