I have created one custom module where user(customer) can upload and edit his own product through frontend( my account ) dashboard. In this I have used code to edit the image and set it to thumbnail, base, and image for uploaded product. But it was not updating the Image. So Later on I tried to change through admin dashboard. Even after setting up thumbnail, small_image and and image but now it is not upating the product image for any product through admin dashboard(backend).
I have used the code
if (!$product->hasSmallImage()) $product->setSmallImage($product->getImage()); if (!$product->hasThumbnail()) $product->setThumbnail(Mage::helper('catalog/image')->init($product, 'thumbnail'));
I dont know where should check for the error as it is not showing error on admin dashboard as well. I have checked the database for product_entity table and for gallery and it is showing the image.