Jump to content

Staying on the same product page after editing product


Guest storyboo

Recommended Posts

Guest storyboo

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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest storyboo

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>

Link to comment
Share on other sites

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>

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...