Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Header Tags Controller for Admin MS 2.2


Farrukh

Recommended Posts

Those lines are in all oscommerce shops. I suppose they could be removed for some reason, maybe some contribution you have installed, but I've never ran across where they are not in there. The contribution comes with a completed categories file. You can use that to compate against. If you don't find it with that, post your categories file here.

 

Jack

 

Hi Jack,

 

Thanks for replying. I triple checked and found that had missed the first instance of $category_inputs_string = '';...etc...etc... and had placed your code in the wrong place. I have fixed that and continued through the rest of the instructions without incident...until....

 

When I click on a product to go to the description, I'm seeing this error on the left of the page...

Warning: main(includes/boxes/header_tags.php): failed to open stream: No such file or directory in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

Warning: main(includes/boxes/header_tags.php): failed to open stream: No such file or directory in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

Warning: main(): Failed opening 'includes/boxes/header_tags.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

 

You can see it here... http://goodfellasgames.com/product_info.ph...products_id=909

 

This is happening on all product description pages. Obviously I've missed something, or put something where it ought not go...I checked the admin/includes/column_left.php and everything seems in order there.

 

Could you please clue me in as to where the problem may be?

Edited by awarner20

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

  • Replies 4.6k
  • Created
  • Last Reply

Top Posters In This Topic

Hi Jack,

 

Thanks for replying. I triple checked and found that had missed the first instance of $category_inputs_string = '';...etc...etc... and had placed your code in the wrong place. I have fixed that and continued through the rest of the instructions without incident...until....

 

When I click on a product to go to the description, I'm seeing this error on the left of the page...

Warning: main(includes/boxes/header_tags.php): failed to open stream: No such file or directory in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

Warning: main(includes/boxes/header_tags.php): failed to open stream: No such file or directory in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

Warning: main(): Failed opening 'includes/boxes/header_tags.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/a/w/a/awarner203/html/includes/column_left.php on line 30

 

 

You can see it here... http://goodfellasgames.com/product_info.ph...products_id=909

 

This is happening on all product description pages. Obviously I've missed something, or put something where it ought not go...I checked the admin/includes/column_left.php and everything seems in order there.

 

Could you please clue me in as to where the problem may be?

 

 

Please disregard...I have found that header_tags.php was not uploaded to the includes/boxes/ directory...sorry for the shakey install of your AWESOME contribution!

 

Thanks so much for this!

 

Adam

Edited by awarner20

We see our customers as invited guests to a party, and we are the hosts. It's our job every day to make every important aspect of the customer experience a little bit better. - Jeff Bezos

Link to comment
Share on other sites

Adding the page in Page Control only adds an entry for that page in the Header Tags files. It doesn't add the actual Header Tags code to the file. See the Install_Catalog.txt file where it mentions changing the code for the <title>. You have to do that for each page you want to use Header Tags with.

 

Also, you don't need to run Fill Tags for new pages. That option is only for filling in items stored in the database (categories, manufacturers and products). And even for those, the tags are filled automatically when those items are created in case you forget.

 

Jack

:blush: opps missed that piece from my original instructions. Thanks :thumbsup:

 

They are all done now & hopefully I have put all the right information in & ticked the right boxes! :lol: I have amended the default & index as you suggested & taken the site name out.

 

Would you be able to help me on one more thing please Jack? :D

 

Your piece of code adds a text link to the current product page. Underneath your piece of code I would like to have the same type of link that takes you to the same place as the "write a review" button in the left column. Like your link it needs to go to the write a review page related to that product. I'm thinking that your code probably does alot of this but I don't know how to amend it. :huh: Then I could comment out that box. I hope you don't mind me asking this loosly related question here?

 

/product_info.php

 

				<tr>
			  <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
			</tr>
			<tr>
			 <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 
			 <?php echo '<a title="' . $tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $tags_array['title'] . '">' . $tags_array['title']; ?></a></td>
			</tr>

 

/includes/languages/english/product_info.php

 

define('TEXT_VIEWING', 'Currently viewing:');

 

Thank you once again

 

Julie

Link to comment
Share on other sites

I have instaled Header Tag Controller 2.6.2.

I have 2 errors:

1. While using Meta Tag option menu in admin menu section fill tags when i'm using fill options about manufactures after pressing update button catogories and product radio butto are in state before i press update but manufatures radio buttons are without any option checked.

as shown (I have tranlate to polish)

oscom.gif

 

2. When i was trying using shop/ categories/products i have such result:

Parse error: syntax error, unexpected $end in /usr/local/apache/www/htdocs/test.epokay.net/suzo/admin/categories.php on line 1291

 

I look to this file but i could'n find any error in categories.php file.

Does anyone has such problems

Link to comment
Share on other sites

Your piece of code adds a text link to the current product page. Underneath your piece of code I would like to have the same type of link that takes you to the same place as the "write a review" button in the left column. Like your link it needs to go to the write a review page related to that product. I'm thinking that your code probably does alot of this but I don't know how to amend it. :huh: Then I could comment out that box. I hope you don't mind me asking this loosly related question here?
I'm not sure I understand. Are you saying you want a link from the products page to the write review page? If so, you would need to use a normal oscommerce type link for that. The one you are referring to in the code is only for on-page links.

 

Jack

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 instaled Header Tag Controller 2.6.2.

I have 2 errors:

1. While using Meta Tag option menu in admin menu section fill tags when i'm using fill options about manufactures after pressing update button catogories and product radio butto are in state before i press update but manufatures radio buttons are without any option checked.

as shown (I have tranlate to polish)

oscom.gif

 

2. When i was trying using shop/ categories/products i have such result:

Parse error: syntax error, unexpected $end in /usr/local/apache/www/htdocs/test.epokay.net/suzo/admin/categories.php on line 1291

 

I look to this file but i could'n find any error in categories.php file.

Does anyone has such problems

The first problem could be because there aren't any manufacturers. The second problem is a coding mistake in the categories file. You should compare your file wth the one in the contribution to try to find the mistake.

 

Jack

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'm not sure I understand. Are you saying you want a link from the products page to the write review page? If so, you would need to use a normal oscommerce type link for that. The one you are referring to in the code is only for on-page links.

 

Jack

Hi Jack

>_< I didn't explain myself well again...sorry

 

Yes I do want an on-page link (haven't heard this before)

I assumed your code was specific to that page & product, so instead of the "write a review" box in my column_left I could have a link like yours, under yours that would be product specific. When they click on the link it would take them to the same place as the "write a review" box link would (/product_reviews_write.php?products_id=XXX where XXX would change with every page). Am I getting totally lost with this one? :blink: Sorry for side tracking. :)

 

Julie

Link to comment
Share on other sites

Hi Jack

>_< I didn't explain myself well again...sorry

 

Yes I do want an on-page link (haven't heard this before)

I assumed your code was specific to that page & product, so instead of the "write a review" box in my column_left I could have a link like yours, under yours that would be product specific. When they click on the link it would take them to the same place as the "write a review" box link would (/product_reviews_write.php?products_id=XXX where XXX would change with every page). Am I getting totally lost with this one? :blink: Sorry for side tracking. :)

 

Julie

If I am understanding you correctly, you are saying that when you view a product page, you want a box (or text) in one of the columns that has a link to the write reviews page? If that is so, you would need to create that link. The kind of link used in Header Tags won't work. You can still build it using the same code as in the box for Header Tags but the link part would be differrent.

 

Jack

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 successfully installed the catalog, and admin portions of the header tags contribution. However when I was editing my index.php during the Catalog install portion I could not find around line 247

?>
<td width="100%" valign="top"><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 echo HEADING_TITLE; ?></td>

So I just pasted the replacement code in at line 231. We initially used a template for the layout on the site and as I understand sometimes certain code is missing. Everything seems to be working, however when I view a product page at the top I am seeing this code displayed

if (isset($HTTP_GET_VARS['manufacturers_id'])) $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); else $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'"); $htc = tep_db_fetch_array($db_query); ?>

Please give me some guidance as to where this snippet of code should be inserted in relation to other entries in index.php. I am in dire need of help b/c the site must be functional for business tomorrow.

Thanks

Phil

Link to comment
Share on other sites

Jack, having a problem with the /includes/languages/english/header_tags.php. Sometimes when adding a page in the admin, it will insert the new block just before the last line of the previous block. Effectively breaking the keywords management for that previous block.

 

On the same site, all the custom page code in /includes/header_tags.php that you have tried to prevent deletion gets deleted when inserting a new page. Doesn't happen everytime.

 

didn't have the time to track down the problems this time.

Link to comment
Share on other sites

Have you noticed if it fails for new pages named a certain way, like with a dash or underscore? I haven't heard of anyone having the problem and can't reproduce it here but it is probably specific to the name.

 

Jack

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 issue of splitting define blocks in the language file was the information.php insert mentioned before. the information.php had two other pages inserted before the last define of the information.php block. In general, the file was unevenly spaced between define block, might be a small logic error.

 

The shop owner clearified that he did do some page deletes as well as adds, but hasn't said which pages. But the result was the "undeleteable" section gone in /includes/header_tags.php

 

the two problem I reported earlier I found while installing and testing.

Link to comment
Share on other sites

Sound great to have them in a database instead of deleting and modifying conde.

 

Hope you have something soon.

 

 

I installed the contribution and am shocked at how the contribution handles adding and deleting pages. I was debugging the contribution in Zend Studio and I kept getting all these "file was modified outside this program" messages. After playing with it for a while and accidentally corrupting the header_tags_controller.php catalog includes file, I figured out what was going on. Each time you add or delete a new file in admin the HTC code actually cuts and pastes code out of the php file. No offense, but isn't this the perfect job for a database table? There is no need to have the server editing php files behind the scenes to account for dynamic content. Just add a new table to the database and store the filenames there instead.

 

I wasn't planning on dedicating time to this contribution other than installing it, but I feel inclined to fix that now. I use my php files across two sites and besides not wanting to have scripts modifying my files in general, I need the files to apply to multiple sites. I also store my php files in SVN, so any changes I make on the live site would be overwritten each time I checked in an update.

Link to comment
Share on other sites

Sound great to have them in a database instead of deleting and modifying conde.

 

Hope you have something soon.

wow, that's some back-reading. I wish everyone would be that through. :thumbsup:

 

Kenja is not the first to bring this up. And may have already been done and uploaded as another contribution. Look around before committing to redesigning this one. Many factors have gone into how this contrib works and why the files have not been move to the database, such as performance is better including files then to draw from the database. But I do think some of the new features that hit the database more and more have negated that issue. Lastly, and most important, many folks have been using this contrib as it was designed many years ago and changing it to that degree would create a nightmare for anyone upgrading. If Kenja succeeds moving the tags files to the database it would be best to start a new contribution rather then confusing all that use this one with drastic changes like that. So look around the contribs for other versions of this one. Just because this is most popular, doesn't mean it's right for you. :)

Link to comment
Share on other sites

Hello I have installed this contribution version 2.5.7, 2.5.9 and today v. 2.6.2. I have found a trouble in the manufacturers title, description and keywords tags because I have spanish, english, german and french languages installed but HTC manufacturers tags only work for the english version and in my spanish pages show english tags, work very well for the categories, every one its own languages but not for manufacturers pages, I dont find where is the error code and what I must do. Can you help me?

Link to comment
Share on other sites

Try going to admin->Header Tags->Fill Tags, select Espanol from the languages menu on that page, click on Fill All under the manufacturers column and then Update. That should set them for you.

 

Jack

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

Yes, if I edit manufacturer Microsoft and change to Microstar for spanish language in tittle tag or keyword or description, the data base work I can see the changes in manufacturers_info table, but dont in the font code only show Microsoft like english language. But if I change the english language Microsoft to Microstar then in the font code show Microstar in all languages include spanish. I have deduce that in manufacturer tags only can show english language is not prepared to multilanguage, is this?

Link to comment
Share on other sites

To you have this code in your index.php file?

   if (isset($HTTP_GET_VARS['manufacturers_id'])) 
  $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
else 
  $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

 

Jack

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

This is my index.php part code:

 

case 'PRODUCT_LIST_PRICE':

$listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";

break;

}

}

if (isset($HTTP_GET_VARS['manufacturers_id']))

$db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");

else

$db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

 

$htc = tep_db_fetch_array($db_query);

?>

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td><h1><?php echo $htc['htc_title']; ?></h1></td>

<?php

Link to comment
Share on other sites

You don't have the proper code installed. You need to read through the instructions for changes to the index.php file.

 

Jack

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

That's common with many templates. If you want to use the option that section of code provides, you will have to add the code back in. Otherwise, just ignore it.

 

Jack

 

Thanks Jack, any idea where I might add that section to, roughly the same line number or else where? Would it help if I posted my codes?

 

Thanks!

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...