Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image name


Guest

Recommended Posts

Posted

I am trying to change the image name in the products table "products_image" rather than just the image name I want it to have the full path http://myshop.com/images/stock/2056.jpg

 

I have defined the new image dir in the admin config

 

define('DIR_STOCK_IMAGES', DIR_FS_CATALOG . 'images/stock/');

 

The above code works to upload the image to the new stock dir

 

And I have played with the following code admin/categories.php

 

if (isset($HTTP_POST_VARS['products_image']) && tep_not_null($HTTP_POST_VARS['products_image']) && ($HTTP_POST_VARS ['products_image'] != 'none')) {

 

$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['products_image']);

 

But I cannot seem to get the filename to include the full path, sometimes I get it to not place a name at all

 

Any ideas please?

Posted

Thanks for that but I am not sure that it is what I need, I actually need the full http path

 

http://myshop.com/images/stock/ put in the image name can this not be done ? I managed to change the upload dir code so that it will upload the file to the new dir

 

I know this will mean changing other code for the display of the item but I need it to link two sites together

Archived

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

×
×
  • Create New...