Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Manual Edit of Product Path


mick-uk

Recommended Posts

I couldn't find this... maybe i didn't look hard enough, so i came up with this:

 

all it does is add another input box that allows you to edit the products image path.

 

edit: catalog/admin/categories.php

 

 

approx line 570 find this:

		  <tr>
		<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_file_field('products_image') . '<br><br>' . tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . $pInfo->products_image . tep_draw_hidden_field('products_previous_image', $pInfo->products_image); ?></td>
	  </tr>

 

Directly below the </tr> paste this:

 

<!-- add image location mick-uk 08-->	 
		<tr>
		<td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?>(Manual Edit)</td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_input_field('products_previous_image', $pInfo->products_image) . '*Image within  /images/ directory<br>'; ?></td>
	  </tr>
<!-- add image location finish mick-uk 08-->

 

 

I have no experience in php what so ever, but i managed to get the above code working... if someone with a little more knowledge could check it over or me that would be great.

 

 

the reason i needed it was i imported a large database, and I have a few images paths that were slightly wrong, rather than scan the database looking for the image path errors, this allowed me to correct the errors as I was enabling them on the website.

 

thanks

mick

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...