X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Return to same place on page after delete (https://forum.x-cart.com/showthread.php?t=63434)

mcpilot 04-26-2012 03:31 PM

Return to same place on page after delete
 
If you are reading a news website like www.msnbc.com and click a story then click "back", it takes you back to the same place on the page you were before, even if you were scrolled halfway down the page.

I would like my customer cart to work the same way. So in other words, customer has 30 items in the cart and scrolled all th way down and deletes #27, I would like to the cart refresh to return him back to that same spot on teh page,.

Currently, the section of cart.php that is making this happen is here:


func_header_location("cart.php");

where after delete, it just returns the customer to his cart, at the top of the page. Is it possible to modify the func_header_location("cart.php"); in some way to be a "back' function instead of a refresh?

Any hints would be very much appreciated. X-Cart 4.1.8 for the purposes of this discussion

totaltec 04-27-2012 04:35 AM

Re: Return to same place on page after delete
 
Well, it might be tricky to work out, but you could probably do it with named anchor tags. What you would need is to assign a named anchor for each item in the cart then pass a variable to cart.php that contains a reference to the item just deleted.

Then some simple if statement to append that onto the cart.php link .


All times are GMT -8. The time now is 10:07 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.