Jump to content



Photo
- - - - -

Product listing problem


This topic has been archived. This means that you cannot reply to this topic.
5 replies to this topic

#1   tapa

tapa
  • Members
  • 31 posts

Posted 04 April 2012 - 08:45

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?

#2   spooks

spooks
  • Members
  • 7,017 posts

Posted 04 April 2012 - 09:48

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.

#3   tapa

tapa
  • Members
  • 31 posts

Posted 04 April 2012 - 16:00

Thanks!

#4   tapa

tapa
  • Members
  • 31 posts

Posted 27 April 2012 - 14:20

Actually , problem gone when I set "Use Search-Engine Safe URLs - True"

But @spooks tip works well too!

#5   spooks

spooks
  • Members
  • 7,017 posts

Posted 27 April 2012 - 15:07

@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.

#6   tapa

tapa
  • Members
  • 31 posts

Posted 27 April 2012 - 16:26

Yes , I found one problem:
in "Advanced search" when I searching by "date from" - "date to" -> problem with pagination.