Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Disable Select Image Dialog Popup in Firefox...?


varanus9

Recommended Posts

I have a problem that I have not be able to find a solution to on the forums...hope someone can help.

 

I use external image hosting for all of my images on my site so that I can use the same images that I use on Ebay (stored on Vendio) for my OSC site. This all works fine and has for years.

 

When I go to enter a new product, what I want to do is just paste the image name into the "Products Image" box. On IE and Netscape, that's all I have to do, and it works perfectly - the product is added, and the site adds the code to tell OSC to pull the image from the Vendio server, and all is fine.

 

But when I try to use Firefox, as soon as I click on the "Products Image" input box, it opens up a dialog box asking me to select an image to upload to the site. Then it forces me to upload an image, which I don't want to have to do...I just want it to write the image name to the correct field in the database so it knows what the image name is.

 

Is this a Firefox issue or an OSC issue? I don't even know where to start on this. I do have an Extra Image contribution installed, and I can just paste the name of the image file, in Firefox, for all of the images other than the first one, and it works fine. Any suggestions? Thanks.

Link to comment
Share on other sites

If you never use the upload feature, then you can do something like changing

	  case 'new_product_preview':
// copy image only if modified
	$products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);
	if ($products_image->parse() && $products_image->save()) {
	  $products_image_name = $products_image->filename;
	} else {
	  $products_image_name = (isset($HTTP_POST_VARS['products_previous_image']) ? $HTTP_POST_VARS['products_previous_image'] : '');
	}
	break;

to

	  case 'new_product_preview':
	$products_image_name = (isset($HTTP_POST_VARS['products_image']) ? $HTTP_POST_VARS['products_image'] : '');
	break;

and changing

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

to

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

Then it will never try to make you upload a product image. You might have to modify this somewhat if you have changed image handling.

Always back up before making changes.

Link to comment
Share on other sites

  • 2 weeks later...

Archived

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

×
×
  • Create New...