Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Location of the images of my products issue


sormui

Recommended Posts

All my images of the products are stored in "htdocs\wonderfil\catalog\images\<category>\" folders. When I try to add a new product to catalog and I put the path for "Product Image" then preview -> save. However, I find that the duplicated image is saved to another location ( one level up - "htdocs\wonderfil\catalog\images\" ). Also the value of "Product Image" is also changed. Does anyone know why it is so weird? I really want to save the images in a category folder under "images" folder. Is there a way to do it? Thanks in advance!!!

Link to comment
Share on other sites

In categories.php

 

	  case 'new_product_preview':
// copy image only if modified
	$products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);

 

thats why

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

In categories.php

 

	  case 'new_product_preview':
// copy image only if modified
	$products_image = new upload('products_image');
	$products_image->set_destination(DIR_FS_CATALOG_IMAGES);

 

thats why

Hi Sam, how can I modify the codes to ensure that all the product images are stored in "htdocs\wonderfil\catalog\images\<category>\" folders? Thanks!

Link to comment
Share on other sites

check what the class is doing exactly, but as the info page puts DIR_WS_IMAGES first you must add the category to the image name. get that with as sql query.

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

check what the class is doing exactly, but as the info page puts DIR_WS_IMAGES first you must add the category to the image name. get that with as sql query.

I could update the value of the product_image in database. But I dont' want to update all the product images in database. Is there another way to update the path of the product images? Thank you!

Link to comment
Share on other sites

you could modify product_info etc

 

tep_image(DIR_WS_IMAGES . $categories['categories_name'].'/'. $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="10" vspace="5"')

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

you could modify product_info etc

 

tep_image(DIR_WS_IMAGES . $categories['categories_name'].'/'. $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="10" vspace="5"')

 

Sorry, Sam! It still doesn't work to me. Do you know if there is a contribution for this?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...