Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Return to same place on page after delete

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-26-2012, 03:31 PM
 
mcpilot mcpilot is offline
 

Advanced Member
  
Join Date: Dec 2004
Location: Cincinnati
Posts: 68
 

Default 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
__________________
thebookfarminc.com
Version 4.7.0
Reply With Quote
  #2  
Old 04-27-2012, 04:35 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default 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 .
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

   

 
X-Cart forums © 2001-2020