Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

SEO


Guest

Recommended Posts

I have been trying to change my site so that it rates highly with search engines, and have checked it using an SEO tool. My site seems ok so far but there are a couple of recommended improvements:

 

H1 Tag is not used or not in 'clean' format (ie < H1 >). It is very important to do so.

 

Some ALT tags are empty. This is not recommended.

 

Any idea how i solve this? I've added the header tags contribution so i thought the H1 tags part would be done but maybe not.

 

Thanks for any help in advance.

Link to comment
Share on other sites

The alt tag may not be a problem. You have to evaluate each one in your code. All image links should have alt tags but not all alt tags use text. For example, the images used for the infoboxes. In those case, of which there are usually many, text in an alt tag would not be using the tag properly and should be avoided.

 

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

Thanks for your help, i added the H1 tag in my stylesheet and they show up on my site, but i'm guessing they may not display for every page, hence the recommended improvement. So i can add the alt tags to images inputed manually, how would i go about adding them in html as i'm not sure on the correct code?

 

Thanks again for your help

Link to comment
Share on other sites

On My Site the H1 tags are displayed when looking through the categories but any other pages (index, info pages (moto information), information etc) they are not. Is there a way i can add them to these pages, and also make the tags more relevant eg 'What's new here' doesn't make sense on my front page.

 

Thanks

Justin

Link to comment
Share on other sites

Adding an alt tag is the same for html and php code: alt=""

 

The code for using h1 should be in your index.php file since that is part of the install instructions. For the other pages, you have to edit them. Find where the HEADING_TITLE is shown. Change the code for it from

<td class="pageHeading">

to

<td><h1>

and include the closing h1 also.

 

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

I'm getting there, i've added the h1 tags to my 'information' section to each file, but how would i go about adding it to my index page and 'moto information' section (the latter i cannot get the header tags contrib to work on also) on My Site as these pages are generated in my admin through a contrib. Here's my file called info_pages located in my root directory which is part of the contrib to generate the pages through my admin:

 

<?php
/*
 $infopageid: info_pages.php,v 1.22 2003/06/05 23:26:22 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

require('includes/application_top.php');



$infopageid = (int)$HTTP_GET_VARS['pages_id'];



$page_query = tep_db_query("select 
                             p.pages_id, 
                             p.status,
                             s.pages_title, 
                             s.pages_html_text                               
                           from 
                             " . TABLE_PAGES . " p LEFT JOIN " .TABLE_PAGES_DESCRIPTION . " s on p.pages_id = s.pages_id
                           where 
                             s.language_id = '" . (int)$languages_id . "'
                           and
                             p.pages_id = $infopageid");



$page_check = tep_db_fetch_array($page_query);
$breadcrumb->add($page_check[pages_title], tep_href_link('info_pages.php?pages_id=' . $infopageid));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5
?>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td class="column" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <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 $page_check[pages_title]; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main"><?php echo stripslashes("$page_check[pages_html_text]"); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td class="column" width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I'd appreciate it if someone could point me in the right direction.

Thanks in advance.

Justin

Link to comment
Share on other sites

For your index page, read the instructions for the catalog part of Header Tags. That file should have been changed during installation. As for the other pages, I don't use that contribution so I cannot help you. Perhaps if you ask in the support thread for it?

 

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

I've posted a question in the support question, with a bit of luck someone will be know how to make this work.

 

Just a thought, i've been looking through the files i added with the extra pages contrib and there is one located in admin/page_manager.php which has the same code as mentioned in the header tags contrib instructions eg

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

Would this make a difference if i change it to

<head><?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.4.5
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.4.5
?>

 

Would this work or am i being stupid?

 

Thanks again

Link to comment
Share on other sites

Unfortunately that didn't work, however i've contacted the creator of the extra pages contribution and received instructions to try and get this to work, but as i'm a bit new to this i don't fully understand them. I've included them below, if anyone can provide me a step by step guide then that would really help me out.

 

Ok, just create a new field on ?pages? table and call it: headertags. Make this field ?text?.

 

 

 

Then open: catalog/admin/page_manager.php and change the queries to support one more field.

 

 

 

Then go into: catalog/info_pages.php and on <head> section run a query to read this data from the database and echo there.

 

 

 

I hope this helps. It is a little bit complex process as you will have to deal with a multilingual module.

 

I appreciate everyones time and effort.

Justin

Link to comment
Share on other sites

Can anyone point out how i do any of the instructions given to me?

 

Thanks to anyone who can help in advance.

Link to comment
Share on other sites

The instructions make it appear like an easy job but it is not. There is a lot to do between the lines. But this will get you going.

 

First, backup your database. The following should not cause a problem but it is never a good idea to make changes to it without a recent backup.

 

Then, go into phpmyadmin, select the pages table and scroll down, on the right hand side, until you see Add fields. Place a 1 in the box between those two words and click Go. Name the field as directed and select TEXT from the menu. Use 255 for the length. Then select Save. That should create the field for you.

 

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