Guest storyboo Posted September 19, 2008 Share Posted September 19, 2008 If you have a ton of freaking products and get pissed off every time you are editing a product how it takes you all the way back to the beginning product list page....try this free mod! Now when you hit edit, yuo will have the option of going BACK to the product list page you were on rather than starting all over again and having to navigate to the correct product page you were on. Great for stores with tons of inventory. Go server side into the file: admin/products/index.php Find This section of code: <tr align="right"> <td colspan="2" nowrap='nowrap'> <a href="index.php?action=gbase"><img src="../images/googleBase.gif" alt="Download Google Base Product Feed" width="76" height="28" border="0" title="" /></a></td> </tr> and after it place this new line of code: <tr align="right"> <td colspan="2" nowrap='nowrap'> <a href= "java script:history.go(-2)" onMouseOver="self.status=document.referrer;return true" >Click HERE to View Previous Product PAge</a></td> </tr> What this little snippet does is it creates a link to go back 2 pages in history....thus putting you right back to the product page you were on previously. Eliminating the need to start all over when you hit edit and have an a$$ load of product edits to make Hope this helps...i too hate the crappy edit button function in admin...so I scripted a simple little code to help us all out! Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2008 Share Posted September 23, 2008 Nice though you need to delete the space between "java" and "script" if you use this. It also works nicely on the frontend on product pages so a customer can go back to the previous page. Just edit viewprod.tpl and put wherever you want it to appear: <div align="right"><a href= "java script:history.go(-1)" onMouseOver="self.status=document.referrer;return true" >Back to Previous Page</a></div> You might want to post this in the "hacks and tweaks" section at cubecartforums.org as that is really the best place for code modifications. Quote Link to comment Share on other sites More sharing options...
Ausy Posted September 23, 2008 Share Posted September 23, 2008 Would love this for version 4, anyone know what code to put and where in version 4? Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2008 Share Posted September 23, 2008 As this uses javascript, it should work in 4 as well as 3. Quote Link to comment Share on other sites More sharing options...
Ausy Posted September 23, 2008 Share Posted September 23, 2008 Yes it does work for 4 too, sorted an annoying problem, excellent Mysty the space between java and script is in your code too but it seems posting it on the forum causes this even though it is typed correct in the first place. Quote Link to comment Share on other sites More sharing options...
Guest Posted September 23, 2008 Share Posted September 23, 2008 Yes I noticed that. Might be a thing the forums do to prevent java script from running. Quote Link to comment Share on other sites More sharing options...
Guest storyboo Posted September 23, 2008 Share Posted September 23, 2008 For cc4 You would edit admin/sources/products Find this bit of code: <form method="post" id="moveProducts" enctype="multipart/form-data"> <table width="100%" border="0" cellspacing="1" cellpadding="3" class="mainTable"> <tr align="right"> Add this bit of code ABOVE!!@ BE SURE TO REMOVE THE SPACE IN JAVASCRIPT...its shows it as two words when its really one word <a href= "java script:history.go(-2)" onMouseOver="self.status=document.referrer;return true" >Click HERE to View Previous Product Page</a> Quote Link to comment Share on other sites More sharing options...
Ausy Posted September 23, 2008 Share Posted September 23, 2008 In V4 I added class="txtLink" to make look more integrated, not a coding expert but it seems to work. <a href= "java script:history.go(-2)" onMouseOver="self.status=document.referrer;return true" class="txtLink" >Click HERE to View Previous Product Page</a> Quote Link to comment Share on other sites More sharing options...
Guest storyboo Posted September 24, 2008 Share Posted September 24, 2008 Yep your right I'm lazy :yeahhh: Quote Link to comment Share on other sites More sharing options...
Guest babyflannel Posted October 26, 2008 Share Posted October 26, 2008 Thanks for this storyboo ! What a life saver ! Your hard work is much appreciated, Sallie x Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.