Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

manufacturer image gone after edit


Jammerious

Recommended Posts

Hi,

does this occur to you too? It does on both my servers.

 

After I edit a manufacturer (chage a custom status field or change url, etc.) it removes the database field entry for the image. Does anyone have a clue why this happens and how to fix it?

Link to comment
Share on other sites

  • 6 months later...

Hi,

does this occur to you too? It does on both my servers.

 

After I edit a manufacturer (chage a custom status field or change url, etc.) it removes the database field entry for the image. Does anyone have a clue why this happens and how to fix it?

 

 

This might be a bit late but I was having the same issue and I came across a solution. I will post it here for others to utilize.

 

In admin/manufacturers.php

 

Find:

 

 if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) {
tep_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
}

 

 

Replace it with:

 

 if ($manufacturers_image = new upload('manufacturers_image', DIR_FS_CATALOG_IMAGES)) {
if (!is_null($manufacturers_image->filename)) {
tep_db_query("update " . TABLE_MANUFACTURERS . " set manufacturers_image = '" . $manufacturers_image->filename . "' where manufacturers_id = '" . (int)$manufacturers_id . "'");
}
}

 

I believe that should do it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...