Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

link worng in product_url


wkdwich

Recommended Posts

I am using product_url to link to an MSDS sheet (chemical info required by the US and I think now overseas..) anyway.. in the admin add product page, in the product url box I type www.somewhere.com/page.htm

I click the Preview button and hover over the link and it is displayed correctly:

http://www.somewhere.com/MSDSpage.htm

 

I click update

 

Now I go to the actual product page and the link when hovering shows:

http://http://somewhere.com/shop/redirect....%2FMSDSpage.htm

 

The only MOD I can think of that might have caused this is the exta product field mod, but that is working correctly..

 

I tried going into redirect.php and editing out the http:// at lines 26-28:

	 case 'url':
if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
	tep_redirect('http://' . $HTTP_GET_VARS['goto']);

changed to:

	 case 'url':
if (isset($HTTP_GET_VARS['goto']) && tep_not_null($HTTP_GET_VARS['goto'])) {
	tep_redirect($HTTP_GET_VARS['goto']);

 

but that had no effect on the link shown in the product page, it still shows the double http://

 

When I click this incorrect link a new window does open but obviously nothing is produced there because of the ill formed link..

 

Now to test further I manage a 2nd osC store.. this one does not have extra fields MOD.. I added a similar link to a product there and after testing it does work correctly there.. so I have to assume something in the extra fields is doing this..

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

It's what prints out the link itself that's causing the double http. The code you're looking at processes the link after it's clicked. So I think the problem is generated on product_info.php not redirect.php.

 

Thanks for the quick response.. I do not see in product_info.php any difference in that section from the store that works correctly to the one that is giving the double http://

 

	if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
	<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>
  </tr>

 

both codes are identical..

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

What is the value of TEXT_MORE_INFORMATION in includes/languages/english/product_info.php?

 

 

define('TEXT_MORE_INFORMATION', 'Need the MSDS Sheet for this product? Please click <a href="http://%s" target="blank"><u>this link</u></a>.<br>Adobe Reader required. Page will open in a new window.');

 

humm looking at the one that works.. which is:

 

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

 

I bet it is that ? in the broken one :) OK let me get that out of there and test.. nope I think I see it now.. the working shop shows:

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

 

The broken one I added http:// there myself I guess.. let me take that out and try again and.. tada!!!!! Huston we have ignition!! thanks so much for your help!

Debbie D
Franklin County, VA "Moonshine Capitol of the World"
osCmax Mobile Template oscmaxtemplates.com

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...