Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can I get the product title to automatically fill the title tag?


DEMAND Performance

Recommended Posts

That contribution looks great. However, I already installed the meta tags contribution. Will these conflict?

 

It looks very powerful and useful. However, if I'm reading right, for each product I have to specify the title tag? Is there the functionality for it to simply copy the existing products title and put it in the title tag? If not, is there a way to code this simply?

Link to comment
Share on other sites

I'm not sure which contribution you mean by meta tag bu t my guess is that the two are not compatible since they serve the same purpose. Once Header Tags is installed, you click on a few buttons in amdin to set it up and all of your products will be set up at that point.

 

Jack

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Well I guess I need to have a look and see about an un-install :)

 

This may be a round-about way to do it, but instead of mucking with adding a contribution for the titles of my pages, I just added a couple of queries and changed the <title> as follows:

 

// The next two queries added by krnl for proper titling of pages
// query for product_info.php page title
$product_title_query = tep_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$product_title = tep_db_fetch_array($product_title_query);
$products_title = $product_title['products_name'];

// query for manufacturer name for page title
$manufac_id_query = tep_db_query("select manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$manufac_id = tep_db_fetch_array($manufac_id_query);
$manufac_ids = $manufac_id['manufacturers_id'];

$manufac_title_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . $manufac_ids . "'");
$manufac_title = tep_db_fetch_array($manufac_title_query);
$manufacs_title = $manufac_title['manufacturers_name'];

<title><?php echo $manufacs_title;echo " - "; echo $products_title; //TITLE; ?> - The All in General Store</title>

 

 

*shrug* works for me :)

Link to comment
Share on other sites

The purpose of changing the titles is not just to change the title to something other than oscommerce. Performing SEO on your site is one of the most important things you can do. Header Tags does far more than change the titles. Taking short cuts on something this important is not a good idea.

 

Jack

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

This is why I stated "this is a roundabout way of doing it". The question was how to change the title tag. He said that his meta tags were already taken care of. I see no problem with this approach if meta tags are already structured in a manner that he is happy with.

Link to comment
Share on other sites

This is why I stated "this is a roundabout way of doing it". The question was how to change the title tag. He said that his meta tags were already taken care of. I see no problem with this approach if meta tags are already structured in a manner that he is happy with.
I meant no offense but the point need to be made. The op said he had a meta tag contribution installed. I don't know which one but they all should change the title as well as the meta tags or they are wasting the users time. If you bypass the way the titles are handled, then you are lessening the effect of the contribution, at least in the case of Header Tags. Your method works fine for someone just wanting to change the title. But if you want to optimize the page for the SE's, which everyone should, then it causes extra work and should not be used.

 

Jack

Support Links:

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

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...