Jump to content
Sign in to follow this  
Farrukh

[Contribution] Header Tags Controller for Admin MS 2.2

Recommended Posts

Okay!

I spoke too soon.

Went back to read the original readme file to see if I missed anything, and I had. I actually have to activate the contribution in my admin box to work. And I see the header tags there...

 

but, when I went to click on "catalogue"

 

I got an error:

 

Parse error: parse error, unexpected ',' in /mnt/w0605/d31/s01/b0267acb/www/gallery/nfoscomm/catalog/admin/categories.php on line 463

 

here is the code just before and after line 463:

 

// BOF: More Pics 6  Added: , products_subimage1, products_subimage2, products_subimage3, 
products_subimage4, products_subimage5, products_subimage6
		$product_query = tep_db_query("select products_quantity, products_model, 
products_image, products_subimage1, products_subimage2, products_subimage3,

 

line 463 is this:

products_subimage4, products_subimage5, products_subimage6

 

Should there be a comma after subimage6?

Share this post


Link to post
Share on other sites

Hi Jack, I am still working on this, seemed to have solved the parse error...

 

now have:

 

Fatal error: Call to undefined function: tep_db_query() in /mnt/w0605/d31/s01/b0267acb/www/gallery/nfoscomm/catalog/admin/categories.php on line 21

TABLE_HEADING_CATEGORIES_PRODUCTS TABLE_HEADING_STATUS TABLE_HEADING_ACTION

 

 // HTC BOC 
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and cd.categories_name like '%" . tep_db_input($search) . "%' order by c.sort_order, cd.categories_name");
} else {
  $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id, c.sort_order, c.date_added, c.last_modified, cd.categories_htc_title_tag, cd.categories_htc_desc_tag, cd.categories_htc_keywords_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by c.sort_order, cd.categories_name");
// HTC EOC

 

Would love to know where to look for the error.

 

Thank you very much,

Julia

http://gallery.juliatrops.com

Share this post


Link to post
Share on other sites

Hi Jack, I am a bit further along. I searched on the forum for a similar fatal error, and saw where you recommended the person to upload the categories.php file that came with the contribution. I did this, and the error went away. I have saved the old one as a .bak just in case that was not a good thing to do.

 

So since there has been a bit happening, I still do have some questions, but they are updated as follows to make talking with me a bit more clear:

 

First, please let me know if I should have/have not done that! uploaded I mean, as I said above, in this post.

 

Second, I dont understand the instructions about updating the other files. In the install_catalog.txt file, you talk about locating the line containing HEAD_TITLE, and removing the pageHeading class and adding the h1 tags above.

 

What is the code I am removing? The same where it talks about in the product_info.php file (around line 104) as referred to in the install_catalog?

 

And third, the only page that has updated is the index file. All the others have not. I must be missing something. I will wait to hear from you!

 

Hope you are having a terrific holiday weekend!

Sincerely,

Julia

 

http://gallery.juliatrops.com

Share this post


Link to post
Share on other sites

The instructions say not to go into the admin section before being sure the shop side is working. But from your questions, I can see you didn't follow those instructions (most don't for some reason). So if oyu have problems it will be more difficult for you to figure out where the problem is at. I suggest starting over and following the instructions. I think it will go a lot easier for oyu.

 

Jack

Share this post


Link to post
Share on other sites

I have one header tag that is reading the wrong page. When I go to the checkout, my Delivery Instructions displays the Shipping and Returns Information Box header tag. I cannot figure out where to change it.

 

Hope someone can send me in the right direction to fix this.

 

Kelvin

Share this post


Link to post
Share on other sites

That sounds like a problem in either the includes/header_tags.php or english/header_tags.php files. Although it doesn't matter since search engines shouldn't be able to get to the checkout page. Usually the default title is all you need there.

 

Jack

Share this post


Link to post
Share on other sites

Have a problem, installed the HTC with No Problems, worked great until now. I deleted the allprods page listing in the admin because I couldn't find that page 'cause I never install that modification, now the product descriptions are NOT part of the Header, nor are the product names part of the title.

 

HELP!!!

 

How do I fix this, I tried clearing all the tags and refilling, but NG.

 

Any ideas, it worked for about a week before this with no errors or problems.

Share this post


Link to post
Share on other sites

Deleting a page like that only changes the includes/header_tags.php and english/header_tags.php files. I can't see how it can cause your problem but you ccould try replacing those files to see if it makes a difference.

 

Jack

Share this post


Link to post
Share on other sites
Deleting a page like that only changes the includes/header_tags.php and english/header_tags.php files. I can't see how it can cause your problem but you ccould try replacing those files to see if it makes a difference.

 

Jack

 

Okay, I'm still trying to figure out what broke... I'll let you know if the header_tags files do the trick.

Share this post


Link to post
Share on other sites
Okay, I'm still trying to figure out what broke... I'll let you know if the header_tags files do the trick.

 

Jack,

 

IT WORKED it seems to be back I noticed there was a considerable size difference, my files we 200 kb smaller than the original files, it appears something might have been corrupted but I didn't do a file compare and I don't feel like repeating the action.

Share this post


Link to post
Share on other sites

I can't say why it failed since I tried deleting that page here and it worked OK. But if you want to delete it and not risk that happening again, you can manually edit those two files and remove the entries for all products.

 

Jack

Share this post


Link to post
Share on other sites
I can't say why it failed since I tried deleting that page here and it worked OK. But if you want to delete it and not risk that happening again, you can manually edit those two files and remove the entries for all products.

 

Jack

 

 

It's working but is inconsistent with product pages as far as the Description Tags only.

 

Here is a partial crawl of my own site:

 

9. Twisted Pair, Kamut & Quinoa, organic 12oz. Munchies Organic Natural Store

Munchies Organic Natural Store provides organic food, organic spices, organic canned goods, and organic clothing in Cumberland Maryland and surrounding areas of Allegany County

URL: http://emonstore.com/store/catalog/product...?products_id=51 - 24k - 06 Sep 2006

 

10. Oregano leaf, cut and sifted, organic ? oz. Munchies Organic Natural Store

Organic Premium, 14oz Thai Kitchen Organic Premium Coconut Milk from the first pressing of fresh, r

URL: http://emonstore.com/store/catalog/product...?products_id=28 - 24k - 06 Sep 2006

 

11. Spaghetti, Whole grain spelt, organic 10oz. Munchies Organic Natural Store

Spaghetti, Whole grain spelt, organic 10oz. INGREDIENTS: ORGANIC WHOLE GRAIN SPELT FLOUR

URL: http://emonstore.com/store/catalog/product...?products_id=30 - 24k - 06 Sep 2006

 

12. Rotini, whole grain spelt, organic 10 oz. Munchies Organic Natural Store

Rotini, whole grain spelt, organic 10 oz.

URL: http://emonstore.com/store/catalog/product...?products_id=52 - 24k - 06 Sep 2006

 

13. Quinoa, Flakes, Organic 12oz Munchies Organic Natural Store

Angel Hair, Whole Grain Spelt, Organic 10oz

URL: http://emonstore.com/store/catalog/product...?products_id=33 - 24k - 06 Sep 2006

 

14. Quinoa, Whole, Organic 8oz Munchies Organic Natural Store

Angel Hair, Whole Grain Spelt, Organic 10oz

URL: http://emonstore.com/store/catalog/product...?products_id=34 - 24k - 06 Sep 2006

 

15. Spirals, Whole Grain Kamut Vegetable, organic 12oz. Munchies Organic Natural Store

Spirals, Whole Grain Kamut Vegetable, organic 12oz. These tasty spirals are made with whole grain

URL: http://emonstore.com/store/catalog/product...?products_id=29 - 24k - 06 Sep 2006

 

16. Cinnamon Sticks CERTIFIED ORGANIC 0.79 oz pouch Munchies Organic Natural Store

Rotini, whole grain spelt, organic 10 oz.

URL: http://emonstore.com/store/catalog/product...?products_id=53 - 24k - 06 Sep 2006

 

17. Rice, brown, organic 1 lb. Munchies Organic Natural Store

Sprouted Wheat Tortillas-Burrito size

URL: http://emonstore.com/store/catalog/product...?products_id=47 - 24k - 06 Sep 2006

 

18. Spinach, cut, organic 10oz. Munchies Organic Natural Store

Sprouted Wheat Tortillas-Burrito size

URL: http://emonstore.com/store/catalog/product...?products_id=44 - 24k - 06 Sep 2006

 

19. Shells, Whole Grain Spelt, Organic 10oz Munchies Organic Natural Store

Shells, Whole Grain Spelt, Organic 10oz

URL: http://emonstore.com/store/catalog/product...?products_id=31 - 24k - 06 Sep 2006

 

20. Angel Hair, Whole Grain Spelt, Organic 10oz Munchies Organic Natural Store

Angel Hair, Whole Grain Spelt, Organic 10oz

URL: http://emonstore.com/store/catalog/product...?products_id=32 - 24k - 06 Sep 2006

 

 

Notice page 9 gives the default description instead of the product description, while many other pages give the correct and sometimes incorrect description.

 

Will you have a bug fix for this in the future or did I miss that fix, I'm using HeaderTags_v2.5.9.1.

 

 

Hope this helps you.

Share this post


Link to post
Share on other sites
I'm reverting to v2.5.9 to see if it fixes it....

 

 

Nope same results...

 

 

5. Twisted Pair, Kamut & Quinoa, organic 12oz. Munchies Organic Natural Store

Munchies Organic Natural Store provides organic food, organic spices, organic canned goods, and organic clothing in Cumberland Maryland and surrounding areas of Allegany County

URL: http://emonstore.com/store/catalog/product...?products_id=51 - 24k - 06 Sep 2006

 

6. Munchies Organic Natural Store

Munchies Organic Natural Store provides organic food, organic spices, organic canned goods, and organic clothing in Cumberland Maryland and surrounding areas of Allegany County

URL: http://emonstore.com/store/catalog/contact_us.php - 20k - 06 Sep 2006

 

7. Munchies Organic Natural Store

Munchies Organic Natural Store provides organic food, organic spices, organic canned goods, and organic clothing in Cumberland Maryland and surrounding areas of Allegany County

URL: http://emonstore.com/store/catalog/privacy.php - 21k - 06 Sep 2006

 

8. Coconut milk, organic premium 14oz Munchies Organic Natural Store

Organic Premium, 14oz Thai Kitchen Organic Premium Coconut Milk from the first pressing of fresh, r

URL: http://emonstore.com/store/catalog/product...?products_id=55 - 25k - 06 Sep 2006

 

9. Munchies Organic Natural Store

Munchies Organic Natural Store provides organic food, organic spices, organic canned goods, and organic clothing in Cumberland Maryland and surrounding areas of Allegany County

URL: http://emonstore.com/store/catalog/conditions.php - 34k - 06 Sep 2006

 

10. Oregano leaf, cut and sifted, organic ? oz. Munchies Organic Natural Store

Organic Premium, 14oz Thai Kitchen Organic Premium Coconut Milk from the first pressing of fresh, r

URL: http://emonstore.com/store/catalog/product...?products_id=28 - 24k - 06 Sep 2006

Share this post


Link to post
Share on other sites

Where are you getting your results from? It can't be an actual search engine. I wouldn't bother try to set up a site for some program you are using. The SE's handle things they way they want. You can't make them list what you want.

 

Jack

Share this post


Link to post
Share on other sites

From post 2727:

 

 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<META name="verify-v1" content="mdcjrcEPkEat0T3a2PAoApDleQGEnwrSnqLKLVoikFg=" />
<title><?php echo TITLE; ?></title>

 

I am about to do this part of the install catalogue:

 

FIND:

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
<title><?php echo TITLE; ?></title>

REPLACE with:

<?php
// BOF: Header Tag Controller v2.5.7
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: Header Tag Controller v2.5.7
?>

 

Your response in 2728 was to remove the extra line...

 

well, I just realized that that line of code is my google verification for the gallery site. So I popped it back in, just above your adjustment code ... if this is not a good thing to do, please let me know!

 

And, I thought I was being very careful in reading the instructions! LOL!

 

Thank you for your help,

Julia

http://gallery.juliatrops.com

Share this post


Link to post
Share on other sites

As long as the code you are adding back in belongs in the head section that is fine. Although, for SEO purposes, it should be placed after the header tags code.

 

Jack

Share this post


Link to post
Share on other sites

Hello all,

 

Thanks so much for this great contribution!

I managed to install the contribution, except I don?t get the ?Header Tags Categories Description?, beneath the subcategory title, on the subcategory product listing.

It works fine for the category product listing.

 

It might have something to see with:

<?php echo $htc['htc_description']; ?>, so I enclose a copy of the area where it is located in index .php:

 

<table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"> 
		<?php echo $tree[$current_category_id]['name']; ?>
<?php
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0) {
  if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	$filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
  } else {
	$filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
  }
  $filterlist_query = tep_db_query($filterlist_sql);
  if (tep_db_num_rows($filterlist_query) > 1) {
	echo '			<td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . '?';
	if (isset($HTTP_GET_VARS['manufacturers_id'])) {
	  echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
	} else {
	  echo tep_draw_hidden_field('cPath', $cPath);
	  $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
	}
	echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
	while ($filterlist = tep_db_fetch_array($filterlist_query)) {
	  $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
	}
	echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
	echo '</form></td>' . "\n";
  }
}

// Get the right image for the top-right
$image = DIR_WS_IMAGES . 'table_background_list.gif';
if (isset($HTTP_GET_VARS['manufacturers_id'])) {
  $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['manufacturers_image'];
} elseif ($current_category_id) {
  $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
  $image = tep_db_fetch_array($image);
  $image = $image['categories_image'];
}
?> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>		   
	  <?php if (tep_not_null($htc['htc_description'])) { ?> 
	  <tr>
	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
	   <td><h2><?php echo $htc['htc_description']; ?></h2></td>
	  </tr>
	  <?php } ?>
	</table>

 

I looked around in the thread so as to find out a solution, but was unable to solve that matter. I don?t use templates. Does anyone could help me?

Again, many thanks!!!

Share this post


Link to post
Share on other sites

All of the above code is correct except for this

<td class="pageHeading"> 
<?php echo $tree[$current_category_id]['name']; ?>

 

Jack

Share this post


Link to post
Share on other sites

Hi Jack,

 

Great answer! You sent me straight to the point, and it works now!

 

Thanks again for your help and this amazing contribution ... :thumbsup:

 

Doublesam

Share this post


Link to post
Share on other sites

I'm using a webcrawler (similar to what Yahoo uses) to get my results.

 

I have no idea how GOOGLE is doing it now, they seem to grab text here, image title there, and then sometimes use my keywords for the description text.

 

I found the error, it was in the fill tags part.

 

I don't know how to fix exactly so went to each item page in admin and fixed description tags.

Share this post


Link to post
Share on other sites

Hi I tried to install this contribution and got this error when going into the admin page

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/akkustom/public_html/catalog/catalog/admin/categories.php on line 272

cant figure it out need a little help

Share this post


Link to post
Share on other sites

It means a mistake was made in the changes for the categories.php file. There is a changed file in the contribution. Just compare that area of code with that in the package and you should be able to find the difference.

 

Jack

Share this post


Link to post
Share on other sites
It means a mistake was made in the changes for the categories.php file. There is a changed file in the contribution. Just compare that area of code with that in the package and you should be able to find the difference.

 

Jack

Thanks for the grat tip it works now

Share this post


Link to post
Share on other sites

I've setup the catalog side of the install and the SQL DB modifications, however I have not setup the admin side because it conflicts with some of my other modifications and I am unsure of how to make the changes correctly.

 

Right now this is how a page shows up in Google:

 

Xbox PC USB Adapter

osCommerce : What's New Here? - Hardware Software DVD Movies.

www.consolestop.com/product_info.php?products_id=53 - 22k - Supplemental Result - Cached - Similar pages

 

Now the page on my website is here:

 

http://www.consolestop.com/product_info.php?products_id=53

 

And as you can see it correctly shows the title I want in Google and everything is correct in the DB (I used the auto populate):

 

SmartJoy X2 USB Adapter - Microsoft Internet Explorer

 

I'm not sure what I'm doing wrong but this is my header_tags.php:

 

// product_info.php - if left blank in products_description table these values will be used

define('HTTA_PRODUCT_INFO_ON','0');

define('HTKA_PRODUCT_INFO_ON','0');

define('HTDA_PRODUCT_INFO_ON','0');

define('HEAD_TITLE_TAG_PRODUCT_INFO','');

define('HEAD_DESC_TAG_PRODUCT_INFO','');

define('HEAD_KEY_TAG_PRODUCT_INFO','');

 

It's been a while (six weeks) since I made any changes so I'm pretty sure something is just wrong, rather than not up to date.

 

UPDATE: I guess it's possible that even though it's been well over a month, maybe Google hasn't updated the site recently, or other search engines are just doing a better job of listing the site:

 

http://www.alltheweb.com/urlinfo?q=www.con...2ecom&c=web

 

http://www.altavista.com/web/results?q=lin...1&avkw=qtrp

 

http://www.hotbot.com/default.asp?prov=Ink...box&tab=web

 

http://search.msn.com/results.asp?RS=CHECK...nsolestop%2ecom

 

All of the above links list the Smartjoy X2 USB Adapter correctly and as I'd like them to be listed with Google along with the correct discription...

 

Any thoughts?

Edited by PM5K

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
Sign in to follow this  

×