Jump to content

Archived

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

WTGMA

Broken Links in Product Page Descriptions

Recommended Posts

Could someone look at the links in the body of this page and tell me where I should start to look to resolve this problem? They worked when set up, don't know why they don't now. Started looking at my site when my google standings went way down. Thanks for any help!

 

http://www.dermessentials.net/store/produc...products_id=183

 

Broken:

 

Purpose Benefits so on across the whole line of links

 

Back to Top (should bring you back to the top of the current page)

 

All Links in the Companion Products Table

 

All Links in the Alternative Brands Table

 

Share Links with Us

 

Could I have deleted a file?

 

will be gone til 9 pm est tonight

 

Thanks in Advance!

Share this post


Link to post
Share on other sites

Well your anchor text is misdirecting you

 

for example this page URL is

 

http://www.dermessentials.net/store/produc...products_id=183

 

if you hover over the link for "purpose" you can see the URL generated is

 

http://www.dermessentials.net/store/#purpose

 

Which is why it isnt working

 

it needs to be:

 

http://www.dermessentials.net/store/produc..._id=183#purpose

 

copy this URL and you can see it will work

 

So

Share this post


Link to post
Share on other sites

you need to check your product_info.php how it generates your #anchor links

 

maybe you can copy and paste the a part code here to see what you have done?

Share this post


Link to post
Share on other sites

This is the HTML:

 

<TABLE cellSpacing=2 cellPadding=2 width=543 border=0>
<TR>
<TD bgColor=#ffffcc>
<DIV align=center><A href="#purpose"><FONT size=2>Purpose</FONT></A></DIV></TD>
<TD bgColor=#ffffcc>
<DIV align=center><A href="#benefits"><FONT size=2>Benefits</FONT></A></DIV></TD>
<TD bgColor=#ffffcc>
<DIV align=center><A href="#ingredients"><FONT size=2>Active<BR>Ingredients</FONT></A></DIV></TD>
<TD bgColor=#ffffcc>
<DIV align=center><A href="#directions"><FONT size=2>Directions</FONT></A></DIV></TD>
<TD bgColor=#ffffcc><A href="#results"><FONT size=2>Results</FONT></A></TD>
<TD bgColor=#ffffcc><A href="#alternatives"><FONT size=2>Companion<BR>Products</FONT></A></TD>
<TD bgColor=#ffffcc><A href="#alternatives"><FONT size=2>Alternative<BR>Brands</FONT></A></TD>
<TD bgColor=#ffffcc><A href="#links"><FONT size=2>Comments<BR>& Links</FONT></A></TD></TR></TABLE>

But this is what's happening.

 

Take for instance the first link #purpose

 

If you click it, the link is this in the browser:

 

http://www.dermessentials.net/store/#purpose

osC uses this code at the very top:

 

<base href="http://www.dermessentials.net/store/">

So your browser takes any link that doesn't start with http:// (or https://) and adds the value of <base href=".."> to the beginning.

 

So your

 

<A href="#purpose">

Becomes

 

http://www.dermessentials.net/store/#purpose

That's the value of <base href=".."> with #purpose added to the end.

 

You can't get rid of the <base href=".."> because that's fundmental to the operation of osC.

 

The solution is this:

 

Add the page URL to the beginning of the anchor name tag, something like this:

 

http://www.dermessentials.net/store/product_info.php?cPath=12&products_id=183#purpose

Example below (click it):

 

#purpose

 

Then code then becomes something like this:

 

<TABLE cellSpacing=2 cellPadding=2 width=543 border=0>
<TR>
<TD bgColor=#ffffcc>
<DIV align=center><a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#purpose' , $request_type) . '">Purpose</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<DIV align=center><a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#benefits' , $request_type) . '">Benefits</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<DIV align=center><a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#ingredients' , $request_type) . '">Active<BR>Ingredients</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<DIV align=center><a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#directions' , $request_type) . '">Directions</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#results' , $request_type) . '">Results</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#alternatives' , $request_type) . '">Companion<BR>Products</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#alternatives' , $request_type) . '">Alternative<BR>Brands</a></DIV></TD>';?>
<TD bgColor=#ffffcc>
<a style="font size:2" href="<?php echo tep_href_link(basename($PHP_SELF),'cPath=' . $cPath . '&products_id= ' . $products_id . '#links' , $request_type) . '">Comments<BR>& Links</a></DIV></TD>';?>
</TR></TABLE>


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

These are the only 2 product_info.php files I can find.

 

Dermessentials.net\store\includes\languages\English\product_info.php

<?php

/*

$Id: product_info.php,v 1.2 2004/03/05 00:36:42 ccwjr Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

*/

 

define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!');

define('TEXT_CURRENT_REVIEWS', 'Current Reviews:');

define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.');

define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.');

define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>');

define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased');

define('TEXT_PRODUCT_OPTIONS', 'Available Options:');

define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge');

define('TEXT_XSELL_PRODUCTS', 'We Also Recommend :');

define('TEXT_NO_MOPICS', 'Coming soon!');

?>

 

Dermessentials.net\store\product_info.php

 

<?php

/*

$Id: product_info.php,v 1.1.1.1 2004/03/04 23:38:02 ccwjr Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

$content = CONTENT_PRODUCT_INFO;

$javascript = 'popup_window.js';

 

require(DIR_WS_TEMPLATES . TEMPLATE_NAME . '/' . TEMPLATENAME_MAIN_PAGE);

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Share this post


Link to post
Share on other sites

×