Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product listing problem


tapa

Recommended Posts

I disable "Display Cart After Adding Product"

 

For example, on page 5 of 20 pages in product listing, after adding product to "basket" (Buy Now), returns me to 1 page of 20.

 

How to correct this?

Link to comment
Share on other sites

The problem is caused buy the tep_href_link function when called through tep_redirect

 

tep_href_link changes any ampersands (&) to & within the uri, which is correct for any in page links, however the tep_redirect is not a link, its a redirect and its purpose for calling tep_href_link is to ensure the sid remains hence session info is not lost, but changing & to & in a redirect is wrong as its re-writing the uri such that it now has & and will no longer be understood

 

A rough and ready fix, in includes/functions/html_output.php line 68:

$link = str_replace('&', '&', $link);

change it to:

if ($_GET['action'] != 'buy_now') $link = str_replace('&', '&', $link);

 

but there are other instances where this could cause issues, so a better fix should be sort.

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

  • 4 weeks later...

@@tapa

Use Search-Engine Safe URLs

 

It would do as that option removes all instances of the ampersand in the uri, however its known that use of Search-Engine Safe URL can cause other problems, so is not recommended.

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

Archived

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

×
×
  • Create New...