Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help to debug problem with linking


human

Recommended Posts

I have a big problem, I can't link to my product pages from outside my shop. I get a lot of dead links from search engines, can't use Tell-a-friend about specific product (about just site, no problem) and so on. :(

 

When I try to link to a specific product page inside my shop, from the outside, like:

 

mydomain.com/product_info.php?products_id=31 (not my domain, just to illustrate, http://www. before also)

 

I get this message: Error! unable to determine page link!

 

This link gives me the same problem:

 

mydomain.com/product_info.php?cPath=30&products_id=31

 

But this link works just fine:

mydomain.com/index.php?cPath=30 (not a specific product page)

 

All the links above works from within the shop.

 

I traced the error-message to includes/functions/html_output.php, see code below:

 

/*
 $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;

   if (!tep_not_null($page)) {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!!</b></font><br><br><b>Unable to determine the page link!<br><br>');
   echo $connection;
   }

 

With my little knowledge, $page is empty, how is that possible? Why do one of the links above work, but not the two other?

 

My information:

 

Search Engine friendly URL is False

Force Cookie True

I have my own SSL-cert (not shared)

STS-contrib. installed

 

 

Can someone help me with this problem, please :sweating:

 

Thanks

jane

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

- Albert Einstein

Link to comment
Share on other sites

It's not a problem actually. The product_info page is not a page that is preloaded with 'products'. It is just a page that is used to display products when the correct cPath and Product ID number are added to the URL of the page you are coming from. With a default osCommerce install all products are viewed from the index.php page, and that is why this is always the first part of the code. On the sites I build I don't use product_info pages, but use hard-coded links from my own added pages. So, linking to them from an outside address wouldn't be a problem, and this is why you don't have a problem when you specify the index.php page as part of the URL.

 

Vger

Link to comment
Share on other sites

It's not a problem actually.  The product_info page is not a page that is preloaded with 'products'.  It is just a page that is used to display products when the correct cPath and Product ID number are added to the URL of the page you are coming from.  With a default osCommerce install all products are viewed from the index.php page, and that is why this is always the first part of the code.  On the sites I build I don't use product_info pages, but use hard-coded links from my own added pages.  So, linking to them from an outside address wouldn't be a problem, and this is why you don't have a problem when you specify the index.php page as part of the URL.

 

Vger

 

Thank you Vger, for you fast reply.

 

I don't understand what you mean, I new to this: :unsure:

 

What does that mean to mee? How can I use the Tell-a-friend about specific product with linking to specific product? How can I hard-code the links there?

 

What to you mean with hard-coded links? (what happen if a customer paste a link from webbrowser to a specific products page and try click on it later from outside shop)

 

Must I tell the search engines not to include product specific links in their files? Disallow certain paths?

 

Is there a contrib. around this problem, because to me (with my knowledge), is a big problem, not being able to link to specific product page and I am sure confusing to my customers when they click on links that does not work or added bookmarks and so on?

 

What is your advice on the matter? The best way around the problem? :unsure:

 

Thanks

jane

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

- Albert Einstein

Link to comment
Share on other sites

I am not sure why it is not working but you should be able to link directly to a product page. If you could not there would be no need for anyone using osC to optimize their product pages for the search engines because the search engines would just be linking to dead pages and that obviously does not make any sense.

 

Using the /product_info.php?products_id=33 path I just checked on a few different stores, one that was using sts and I had no problem linking to the product page.

 

I am not sure why you would be having trouble with your store. You might try setting your force cookie to false and see if that makes a difference. Do you have any kind of hot link protection turned on? I have had problems in the past with that.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

I am not sure why it is not working but you should be able to link directly to a product page. If you could not there would be no need for  anyone using osC to optimize their product pages for the search engines because the search engines would just be linking to dead pages and that obviously does not make any sense.

 

Using the /product_info.php?products_id=33  path I just checked on a few different stores, one that was using sts and I had no problem linking to the product page.

 

I am not sure why you would be having trouble with your store. You might try setting your force cookie to false and see if that makes a difference.  Do you have any kind of hot link protection turned on? I have had problems in the past with that.

 

Thank you for your input.

 

I have tried: force cookie false but with same problem.

 

I have no hot link protection.

 

 

Thanks

jane

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

- Albert Einstein

Link to comment
Share on other sites

  • 4 weeks later...
Thank you for your input.

 

I have tried: force cookie false but with same problem.

 

I have no hot link protection.

Thanks

jane

 

At last, I solved my problem.

 

It was with my Back-button, I had it to work like a back-button on a browser, that is go back one step, the problem was when the one step was outside my Osc-shop. I change my Back button to go to Category-page instead. It took me more than a month to figure this one out, I am a newbie you know. :lol: zzz now I have to sleep.

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

- Albert Einstein

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...