I am hoping someone can help me here since the CS Cart team is too busy to help me. On all my product detail pages, I have a Return button that brings the user from the product back to the list. CS-Cart supplied me this code, but they didn't take into account if the category was split up over several pages of products. So what happens is if the user is on page three of the product listing pages and clicks to view a product, the Return button brings the user back to the top of page 1, losing their space. In theory, they should return to the page they left off and at the position on the page of the product (or in the least to the page they left off).
First, thank you so much for replying. I really appreciate your help.
Tbirnseth, thanks for the mod to the code, but I need it to be dynamic. The “&page=1” brings it back to page 1, as it says. So if I'm on page 5, click into a product, I need it to return to page 5 (and preferably to the location of the product within the listing).
StellarBytes - yeah, I thought of that too, except the problem is if they arrive at the product not from the product listing page. Thanks for the thought though!!
No sorry, the code I was and AM using did go to the first page correctly. It wasn't until I set the products page to display a certain amount at a time that I ran into this issue (it was previously set to show all products in the category at once). I want it to dynamically return to the page the product it's listed on. So if I click from product listing page 5 into the product detail view, I want to click a button to return to the list, but at the spot I left off. It keeps kicking me back to page one, resulting in having to remember which page I was on to keep going through the list. Sorry if I wasn't clear. Does that make sense now?
So, in regards to your reply, I'm not sure what you mean when you say do the math on the $smart.request.page… I hate to ask you to explain, but if you had a moment I would love to understand how that applies.
Ah, I see. OK, this is indeed way over my head. Would you happen to know how other people work around this issue? It seems to be a bit of a flaw in the navigation of the system, no? Just curious your thoughts on this…
Thank you so much for taking the time to try to help me - I really do appreciate it.
Is there anybody that might be able to help me? I'm trying to figure out how to incorporate the $smarty.server.HTTP_REFERRER as Tbirnseth recommended, but it's failing each time as my smarty capabilities are next to none…