Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to determine the page link?


casch

Recommended Posts

If it helps any...

 

You get that error from tep_href_link function if the connection type passed to it is not 'SSL' or 'NONSSL'.

 

Maybe a minor code change willl help track down the offending code?

:unsure:

 

/catalog/includes/functions/html_output.php

 

In the function:

 

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

You could change this code:

 

	  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

To:

 

	  $from = $_SERVER['PHP_SELF'];
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>Method[' . $connection . ']<br>Script[' . $from . ']');

I tested this and purposely introduced the error on a page and it told me the connection method I was trying to use and the script it was called from.

 

Maybe you just have a glitch in an FTP'd file.

:(

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 >

Link to comment
Share on other sites

  • Replies 76
  • Created
  • Last Reply

It was a long shot at best...

 

Mind saying what the entire error message was (by confidential PM if you want)?

:unsure:

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 >

Link to comment
Share on other sites

Actually it did not change the message at all.. but the one you gave me there above referenced Unable to determine connection method on a link. After no result I applied the same method to Unable to determine page link just above that reference. It then said the same thing except for it then Method: [filename of what ever page I tried]

Link to comment
Share on other sites

That's odd....

:blink:

 

Method should contain the connection method requested, and Script should have the filename...

:unsure:

 

If I had any more tricks up my sleve I'd post them - but I don't.

:(

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 >

Link to comment
Share on other sites

Most all the information I can find says to add this directly above the tep_href_link function.

 

global $HTTP_SERVER_VARS;
if($page='')
$HTTP_SERVER_VARS['PHP_SELF'];

 

The error remains unchaged though with no success.. Is there something wrong with the code supplied that would effect today as most of those code snippets I am finding is somewhat outdated.

Link to comment
Share on other sites

The PHP manual says $HTTP_SERVER_VARS has been deprecated and to use $_SERVER instead.

 

Although that may not get you any closer to a solution.

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 >

Link to comment
Share on other sites

you have us stabbing in the dark somewhat here as u provide v limited info

 

try this:

 

in application_top.php

find (94)

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);

add after:

if (($PHP_SELF == '') || (strlen(trim($PHP_SELF)) == 0)) $PHP_SELF = rtrim(str_replace(array(getenv('PATH_INFO'),getenv('QUERY_STRING')) , '', $_SERVER['REQUEST_URI']), '?');

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Sorry Sam I didnt make it back here in time before you made your post. So far I got rid of the problem. Since I had no personal edits in the file I replaced it with a stock file. /includes/functions/html_output.php is the one I replaced. Got rid of the error. Now I am getting new errors which I have worked my way through most and am stuck again though. Im getting this error from a stock file at that?

 

Parse error: syntax error, unexpected T_ELSE in /home/www/********.com/includes/functions/sessions.php on line 115

 

My editor shows this function being part of 115. Again this is stock. Line 115 according to Notepad ++ is $_SESSION[$variable] = null;

 

	if ($session_started == true) {
  if (PHP_VERSION < 4.3) {
	return session_register($variable);
  } else {
	if (isset($GLOBALS[$variable])) {
	  $_SESSION[$variable] =& $GLOBALS[$variable];
	} else {
	  $_SESSION[$variable] = null;
	}
  }
}

return false;
 }

Link to comment
Share on other sites

  • 4 weeks later...
If you have PHP4.1.0+ here's a suggestion that might be even better than simon's suggestion:

 

Just change the function definition from this:

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

 

to this:

 

function tep_href_link($page = $_SERVER[ 'PHP_SELF' ], $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

 

That will just set $page to $_SERVER[ 'PHP_SELF' ] if it's not set to something else when the function is called. No need to declare any variables (HTTP_SERVER_VARS) global or anything.

 

There is a concern about defaulting $page to php_self of course - what if there's a redirect that isn't receiving a page reference and just keeps pointing to itself. It will generate a message (at least in IE) something along the lines of 'The page request reached it's maximum redirect blah blah blah'.

 

-chicken

 

Here is what mine shows...where would I put the code?

 

// Redirect to another page or site

function tep_redirect($url) {

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {

tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));

}

 

if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page

if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url

$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL

}

}

Link to comment
Share on other sites

Here is what mine shows...where would I put the code?
In the function, tep_href_link rather than in tep_redirect?

 

Also, note that the next post after the one that you quoted notes that you can't use $_SERVER in a function definition. I think that Sam's solution in the third page of this thread is better, you should change how $PHP_SELF is defined in includes/application_top.php rather than changing html_output.php.

 

For example, changing (around line 46)

// set php_self in the local scope
 if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

to

// set php_self in the local scope
 if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['SCRIPT_NAME'];
 if (!isset($PHP_SELF)) $PHP_SELF = $_SERVER['PHP_SELF'];

might fix your problem.

Always back up before making changes.

Link to comment
Share on other sites

  • 2 months later...

I think i solved this problem - if you still find it hard to figured out - please give me a sign B) - I don't really now if this topic is still active

Link to comment
Share on other sites

I think i solved this problem - if you still find it hard to figured out - please give me a sign B) - I don't really now if this topic is still active

 

Hi,

 

I have OSC 2.2RC2a installed in the root directory of my server (MySQL 5 is there) and I keep receiving this 'Unable to determine the page link!' error. It happens for the footer only and only if one of the following conditions are met:

 

1. Site address is entered as http://domain (without/index.php)

2. Top link is used to go to the main page.

 

Oterwise it works smoothly. Also it doesn't happen if the store is installed inside catalog folder, but I just need shop without any fancy webportals around, so creating "index.html" or any other workaround using shop inside catalog folder is really the last one I'd use. I just need something that works without any workarounds of this kind...

 

I tried some contributions (like indexfix) and other stuff mentioned in the posts around different forums, but nothing helped.

I have no possibility to downgrade mysql (as one of the posts I read suggested), so I'm still looking...

 

I'd really appreciate any help (other thatn changing provider - this is not an option).

 

Thanks in advance,

piotr

Link to comment
Share on other sites

Hi,

 

I have OSC 2.2RC2a installed in the root directory of my server (MySQL 5 is there) and I keep receiving this 'Unable to determine the page link!' error. It happens for the footer only and only if one of the following conditions are met:

 

1. Site address is entered as http://domain (without/index.php)

2. Top link is used to go to the main page.

 

Oterwise it works smoothly. Also it doesn't happen if the store is installed inside catalog folder, but I just need shop without any fancy webportals around, so creating "index.html" or any other workaround using shop inside catalog folder is really the last one I'd use. I just need something that works without any workarounds of this kind...

 

I tried some contributions (like indexfix) and other stuff mentioned in the posts around different forums, but nothing helped.

I have no possibility to downgrade mysql (as one of the posts I read suggested), so I'm still looking...

 

I'd really appreciate any help (other thatn changing provider - this is not an option).

 

Thanks in advance,

piotr

 

 

Try this, it works for me:

 

Hi,

 

Very first i want to inform you those are not much familiar with oscommerce.

 

The function tep_href_link is not in general.php, this is in html_output.php in the same directory.

 

 

I have just added given lines in tep_href_link function and then all working fine on my server:

 

global $link,

if($page == '') { $page = basename($_SERVER['PHP_SELF']); }

 

 

Now the function will look like this..

 

function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {

 

global $request_type, $session_started, $SID, $spider_flag;

 

global $link;

if($page == '') { $page = basename($_SERVER['PHP_SELF']); }

 

/* 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>');

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000">'.TEP_HREF_LINK_ERROR1);

}*/

 

if ($connection == 'NONSSL') {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

} elseif ($connection == 'SSL') {

if (ENABLE_SSL == true) {

$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;

} else {

$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;

}

} else {

//die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');

die('</td></tr></table></td></tr></table><br><br><font color="#ff0000">'.TEP_HREF_LINK_ERROR2);

}

 

 

and this one:

 

you have us stabbing in the dark somewhat here as u provide v limited info

 

try this:

 

in application_top.php

find (94)

 

$PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);

 

 

add after:

 

if (($PHP_SELF == '') || (strlen(trim($PHP_SELF)) == 0)) $PHP_SELF = rtrim(str_replace(array(getenv('PATH_INFO'),getenv('QUERY_STRING')) , '', $_SERVER['REQUEST_URI']), '?');

 

 

 

I had the same problem, now it works fine so far :D

Link to comment
Share on other sites

  • 3 weeks later...

I also have this problem. I have tried several stuff but with no luck. Search-Engine Safe URLs is set to false.

 

I receive the "Unable to determine the page link!"-error message on product_info.php page for some products, but not all. And I cant find any pattern for the products that generate the error message.

Is there anyone that have any ide of what I can do to solve this?

Link to comment
Share on other sites

I also have this problem. I have tried several stuff but with no luck. Search-Engine Safe URLs is set to false.

 

I receive the "Unable to determine the page link!"-error message on product_info.php page for some products, but not all. And I cant find any pattern for the products that generate the error message.

Is there anyone that have any ide of what I can do to solve this?

 

 

Without your code its very hard to tell what your error is caused by!! Can you post the code?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Here's the code from seo.class.php. Do I need to post some more code?

/**
* Stock function, fallback use 
*/        
 function stock_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $request_type, $session_started, $SID;
   if (!$this->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>');
   }
       if ($page == '/') $page = '';
   if ($connection == 'NONSSL') {
     $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
   } elseif ($connection == 'SSL') {
     if (ENABLE_SSL == true) {
       $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
     } else {
       $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
     }
   } else {
     die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
   }

Link to comment
Share on other sites

 

 

I thought you said the error occured in product_info.php ??

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Yes, it does. But I didnt thought the code in product_info.php had anyting to do with it. But heres the code for product_info.php:

<?php
/*
$Id: product_info.php 3 2006-05-27 04:59:07Z user $

 osCMax Power E-Commerce
 http://oscdox.com

 Copyright 2006 osCMax

 Released under the GNU General Public License
*/

// Most of this file is changed or moved to BTS - Basic Template System - format.
// For adding in contribution or modification - parts of this file has been moved to: catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
//       catalog\templates\fallback\contents\<filename>.tpl.php as a default (sub 'fallback' with your current template to see if there is a template specife change).
// (Sub 'fallback' with your current template to see if there is a template specific file.)

 require('includes/application_top.php');

// LINE ADDED: MOD - Added for Dynamic MoPics v3.000
 require(DIR_WS_FUNCTIONS . 'dynamic_mopics.php');
 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);


// BOF: Additional Images
 if (empty($_GET['pID'])) { $_GET['pID'] = $_GET['products_id']; }

if (ADDIMAGES_MENU_LOCATION == 'product_info') { 
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_POPUP_ADD_IMAGE);

// $navigation->remove_current_page();

 if (!empty($_GET['imagesID'])) {
   $products_query = tep_db_query( "SELECT ai.products_id, ai.images_description, ai.thumb_images, ai.medium_images, ai.popup_images, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description FROM " . TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.additional_images_id = '".(int)$_GET['imagesID']."'");
   $selected_image = tep_db_fetch_array($products_query);
 } elseif (!empty($_GET['pID'])) {
   $products_query = tep_db_query( "SELECT products_id, products_image, products_image_med, products_image_pop, products_image_description FROM " . TABLE_PRODUCTS . " WHERE products_id = '".(int)$_GET['pID']."'");
   $selected_image = tep_db_fetch_array($products_query);
 }

 $imagemenu = new displayonpageimagemenu ( $selected_image['products_id'] );

 // calculate menu size in pixels
 $extra_window_width = 24;  // space for web browser
 $extra_window_height = 86;  // space for web browser

 if (ADDIMAGES_POPUP_SHOW_ON_POPUP == 'true' && ($imagemenu->addimages_count > 1)) {
   list ($menu_width, $menu_height) = $imagemenu->boxsize();
   if (ADDIMAGES_POPUP_TABLE_LOCATION == 'sides') { 
  $extra_window_width += $menu_width; 
  if ($imagemenu->maximageheight < $menu_height) { $imagemenu->maximageheight = $menu_height; }
}
   if (ADDIMAGES_POPUP_TABLE_LOCATION == 'above' || ADDIMAGES_POPUP_TABLE_LOCATION == 'below') { 
  $extra_window_height += $menu_height; 
  if ($imagemenu->maximagewidth < $menu_width) { $imagemenu->maximagewidth = $menu_width; }
}
 }
 if(!empty($selected_image['products_image_description'])) { 
   $imagemenu->maximageheight += 22; // add space for large image description text height
 }
}
// EOF: Additional Images


 $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';


?> <?php // BOF: Additional Images ?>
<script language="javascript"><!--
function showImage(img,width,height) {
 if (document.getElementById("mainimage")) {
   document.getElementById("mainimage").src = img;
   document.getElementById("mainimage").height = height;
   document.getElementById("mainimage").width = width;
 }
}
//--></script>
<?php // EOF: Additional Images ?> <?php


 include (bts_select('main', $content_template)); // BTSv1.5

 require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

 

As you can see I use BTS, so heres the code for product_info.tpl.php

    <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
  // BOF Separate Price per Customer
    if(!tep_session_is_registered('sppc_customer_group_id')) { 
    $customer_group_id = '0';
    } else {
     $customer_group_id = $sppc_customer_group_id;
    }
  // EOF Separate Price per Customer
?>
     <tr>
       <td><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></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>
<?php
 } else {
 // BOF: Additional Images: Added:  $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id 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_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, p.products_image_med, p.products_image_pop, p.products_image_description, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id 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 . "'");
   // EOF: Additional Images	
   $product_info = tep_db_fetch_array($product_info_query);

   tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

   if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
// BOF Separate Price per Customer

       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
       $product_info['products_price']= $scustomer_group_price['customers_group_price'];
}
// EOF Separate Price per Customer
     $products_price = '<span style="text-decoration:line-through">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
   } else {
// BOF Separate Price per Customer
       $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id =  '" . $customer_group_id . "'");
       if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) {
       $product_info['products_price']= $scustomer_group_price['customers_group_price'];
}
// EOF Separate Price per Customer
     $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
   }

   if (tep_not_null($product_info['products_model'])) {
     $products_name = $product_info['products_name'] . '<br><span class="smallText">[' . $product_info['products_model'] . ']</span>';
   } else {
     $products_name = $product_info['products_name'];
   }

// BOF: Additional Images
$additional_images = new displayimages ( $product_info['products_id'] );
// EOF: Additional Images


// BOF: Mod - Wishlist
//DISPLAY PRODUCT WAS ADDED TO WISHLIST IF WISHLIST REDIRECT IS ENABLED
   if(tep_session_is_registered('wishlist_id')) {
?>  
     <tr>
       <td class="messageStackSuccess"><?php echo PRODUCT_ADDED_TO_WISHLIST; ?></td>
     </tr> 
<?php
     tep_session_unregister('wishlist_id');
   }
// EOF: Mod - Wishlist
?>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
           <td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
// BOF: Additional Images    ADDED to if statement:  && ADDIMAGES_GROUP_WITH_PARENT == 'false'
   if (tep_not_null($product_info['products_image']) && ADDIMAGES_GROUP_WITH_PARENT == 'false') {
// EOF: Additional Images	
?>
<!-- // BOF: Additional Images  -->
         <table border="0" cellspacing="0" cellpadding="2" align="<?php echo ADDIMAGES_TABLE_ALIGNMENT; ?>"<?php if (ADDIMAGES_MENU_LOCATION == 'product_info') { echo ' width="'.($imagemenu->maximagewidth+$extra_window_width).'" height="'.($imagemenu->maximageheight+$extra_window_height).'"'; } ?> style="position: relative;">
<!-- // EOF: Additional Images  -->
           <tr>
             <td align="center" class="smallText">
<?php 
// BOF: Additional Images
if (ADDIMAGES_MENU_LOCATION == 'product_info') { 

if (ADDIMAGES_POPUP_TABLE_LOCATION=='above' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
  echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';
}

echo '<table border="0" cellspacing="0" cellpadding="0"><tr>';
if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && (ADDIMAGES_POPUP_TABLE_ALIGNMENT=='left' || ADDIMAGES_POPUP_TABLE_ALIGNMENT=='center') && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
  echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';
}

echo '<td valign="middle" align="center" width="' . $imagemenu->maximagewidth . '" height="' . $imagemenu->maximageheight . '">';
   if (!empty($_GET['imagesID'])) {
     echo tep_image(DIR_WS_IMAGES_PRODUCTS . (!empty($selected_image['popup_images'])?$selected_image['popup_images']:(!empty($selected_image['medium_images'])?$selected_image['medium_images']:(!empty($selected_image['thumb_images'])?$selected_image['thumb_images']:''))), $selected_image['images_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['images_description'])?$selected_image['images_description']:'');
} elseif (!empty($_GET['pID'])) {
     echo tep_image(DIR_WS_IMAGES_PRODUCTS . (!empty($selected_image['products_image_pop'])?$selected_image['products_image_pop']:(!empty($selected_image['products_image_med'])?$selected_image['products_image_med']:(!empty($selected_image['products_image'])?$selected_image['products_image']:''))), $selected_image['products_image_description'], (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_WIDTH:''), (ADDIMAGES_POPUP_RESTRICT_IMAGE_SIZE=='true'?POPUP_IMAGE_HEIGHT:''), 'id="mainimage"') . (!empty($selected_image['products_image_description'])?$selected_image['products_image_description']:'');
}
echo '</td>';

if (ADDIMAGES_POPUP_TABLE_LOCATION=='sides' && ADDIMAGES_POPUP_TABLE_ALIGNMENT=='right' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
  echo '<td valign="middle" align="center" class="pageHeading">' . (TEXT_MENU_TITLE != ''?TEXT_MENU_TITLE . '<br>':'') . $imagemenu->groupoutput() . '</td>';
}
if (!empty($imagemenu->maximagewidth) && !empty($imagemenu->maximageheight)) { echo '<td>' . tep_draw_separator('pixel_trans.gif', '4', $imagemenu->maximageheight) . '</td>'; }
echo '</tr></table>';

if (ADDIMAGES_POPUP_TABLE_LOCATION=='below' && ADDIMAGES_POPUP_SHOW_ON_POPUP=='true' && ($imagemenu->addimages_count > 1)) {
  echo '<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td valign="middle" align="center" class="pageHeading">' . TEXT_MENU_TITLE . '</td></tr><tr><td valign="middle" align="center">' . $imagemenu->altgroupoutput() . '</td></tr></table>';
}

} else {
?><script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_ADD_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES_PRODUCTS . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), addslashes($product_info['products_name']), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES_PRODUCTS . (!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:$product_info['products_image'])) . '" target="_blank">' . tep_image(DIR_WS_IMAGES_PRODUCTS . (!empty($product_info['products_image_med'])?$product_info['products_image_med']:(!empty($product_info['products_image_pop'])?$product_info['products_image_pop']:(!empty($product_info['products_image'])?$product_info['products_image']:''))), $product_info['products_name'], (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_PARENT=='true'?DISPLAY_IMAGE_HEIGHT:''), 'hspace="5" vspace="5"') . '<br>' . (!empty($product_info['products_image_description'])?$product_info['products_image_description']:TEXT_CLICK_TO_ENLARGE) . '</a>'; ?>
</noscript><?php
}
// EOF: Additional Images ?>
             </td>
           </tr>
         </table>
<?php
   }
// BOF: Additional Images
if (ADDIMAGES_TABLE_LOCATION=='above' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
  echo $additional_images->altgroupoutput();
} else if (ADDIMAGES_TABLE_LOCATION=='sides' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') {
  echo $additional_images->groupoutput();
}
// EOF: Additional Images
?>
         <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
   $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
//++++ QT Pro: Begin Changed code
     $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); 
     require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
     $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
     $pad = new $class($products_id);
     echo $pad->draw();
//++++ QT Pro: End Changed Code
   }
?>
       </td>
     </tr>
<?php // BOF: Additional Images
if (ADDIMAGES_TABLE_LOCATION=='below' && ADDIMAGES_SHOW_ON_PRODUCT_INFO=='true' && ADDIMAGES_MENU_LOCATION == 'popup') { ?>
     <tr>
       <td><?php echo $additional_images->altgroupoutput(); ?></td>
     </tr>
<?php } 
// EOF: Additional Images ?>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>
     <tr>
       <td class="main"><?php // echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   }

   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>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
   }

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
     </tr>
<?php
   } else {
?>
     <tr>
       <td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
     </tr>
<?php
   }
?>
     <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 class="main"><?php // echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>  -->
               <!-- Wish List 3.5 Start -->
               <td class="main"><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td>
               <!-- Wish List 3.5 End   -->
               <td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '50'); ?></td>
     </tr>
     <tr>
       <td>
<?php

//added for cross -sell
  if ( (USE_CACHE == 'true') && !SID) {
   echo tep_cache_also_purchased(3600);
    include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
  } else {
    include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);
     include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
   }
 }
?>
       </td>
     </tr>
   </table></form>

Link to comment
Share on other sites

 

 

Sorry, don't know BTS, perhaps you should raise this in the BTS thread.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 3 weeks later...

A quick and easy hack to fully resolve this issue is:

 

Edit includes/configure.php

 

At the top, add:

 

$HTTP_SERVER_VARS = $_SERVER;
$HTTP_GET_VARS = $_GET;
$HTTP_POST_VARS = $_POST;

 

This essentially does the same thing as Register_Globals = On.

 

Chris

Link to comment
Share on other sites

  • 9 months later...

A quick and easy hack to fully resolve this issue is:

 

Edit includes/configure.php

 

At the top, add:

 

$HTTP_SERVER_VARS = $_SERVER;
$HTTP_GET_VARS = $_GET;
$HTTP_POST_VARS = $_POST;

 

This essentially does the same thing as Register_Globals = On.

 

Chris

 

I can confirm this worked great for me. I wish I had read this post first(something I forgot tonight but learned long ago is to often read troubleshooting thread backwards). All the changes/fixes previously were very specific and didn't fix everything. This fixed it all. Box variable issues, Error message in the admin section, non-functioning edits in the admin section, my nagging friend whose site I was fixing... All better now. Thanks!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...