Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Custom Image Categories


Creative210

Recommended Posts

Hello I was wondering how I can have a custom image dir.

like the demo ones in oscommerce.

 

I have already created the folder via ftp. called "sony" but in the admin

section when I browse > upload the image it saves to the /image dir.

Not the /image/sony dir.

 

Any help is much appreciated!

Link to comment
Share on other sites

When you "browse" you are getting your images from your computer

So on your computer create the folder image/sony and it should upload in the sony folder

 

The_Bear

Link to comment
Share on other sites

To create a custom image folder:

 

1. Create the folder you require:

catalogue/Images/MY_NEW_FOLDER

 

2. Upload your required image to newly created folder:

catalogue/Images/MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

3. In ADMIN

Browse for image:

c:/catalogue/Images/MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

IMPORTANT:

Change to

c:/catalogue/Images/MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

You Now have your image uploaded :D

 

For each subsequent folder you add i.e

c:/catalogue/Images/MY_NEW_FOLDER/MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

Just change / to \

 

So this would now be:

c:/catalogue/Images/MY_NEW_FOLDER\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

:wacko:

Link to comment
Share on other sites

Hello,

 

When I try HappySlapper's method, there's error message "Warning: move_uploaded_file(/home/moviesite/public_html/try/images/dvd/disney9-11.jpg): failed to open stream: Permission denied in /home/moviesite/public_html/try/admin/includes/classes/upload.php on line 94".

 

What's wrong?

Link to comment
Share on other sites

To Create A Custom Image Folder:

 

1. Create Folder i.e

 

c:\catalogue\images\MY_NEW_FOLDER

 

2. Upload Image

 

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

3.IN ADMIN

Choose product etc.

Browse for image

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

IMPORTANT: Change to

c:\catalogue\images\MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

For each subsequent folder you would change the \ to /

 

i.e

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

Becomes

c:\catalogue\images\MY_NEW_FOLDER/MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

Cilck preview your image should now upload but not upload if you know what I mean..... :wacko:

 

All Done...

 

Hope this helps!

Link to comment
Share on other sites

P.s Don't know if you need to do this before uploading to your server as I run my own...I't works a treat and keeps all my pics nice and neat.

Link to comment
Share on other sites

P.s Don't know if you need to do this before uploading to your server as I run my own...I't works a treat and keeps all my pics nice and neat.

Warning: move_uploaded_file(/www/creativeshop/store/images/images/powr-flite/powr-flite_pd750dx.jpg) [function.move-uploaded-file]: failed to create stream: No such file or directory in /home/www/steam-brite/store/admin/includes/classes/upload.php on line 94

 

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpnGxqzu' to '/www/creativeshop/store/images/images/powr-flite/powr-flite_pd750dx.jpg' in /home/www/steam-brite/store/admin/includes/classes/upload.php on line 94

 

Error: File upload not saved.

 

Ya. Same error. I tried removing the file I wanted to upload via FTP. Then tried to remove the folder totally. Could it be the permissions? I have mine at chmod 775.

 

Any idea anyone?

Link to comment
Share on other sites

Sorry but i'm a bit of a lamer with php but i did add a line change in my configure.php

 

define ('DIR_WS_IMAGES', 'images/products/');

 

My image folder is as follows

 

shop/images/products/barebone_systems/image_whatever.jpg

shop/images/products/digital_imaging/image_whatever.jpg

etc...etc.

 

You must create the folder first and you must place your image there BEFORE you upload with admin...

(admin will not upload your image, it will just know where to find it).

 

Sorry I can't be of more help... :wacko:

Link to comment
Share on other sites

To Create A Custom Image Folder:

 

1. Create Folder i.e

 

c:\catalogue\images\MY_NEW_FOLDER

 

2. Upload Image

 

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

3.IN ADMIN

Choose product etc.

Browse for image

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

 

IMPORTANT: Change to

c:\catalogue\images\MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

For each subsequent folder you would change the \ to /

 

i.e

c:\catalogue\images\MY_NEW_FOLDER\MY_NEW_FOLDER\MY_NEW_IMAGE.jpg

Becomes

c:\catalogue\images\MY_NEW_FOLDER/MY_NEW_FOLDER/MY_NEW_IMAGE.jpg

 

Cilck preview your image should now upload but not upload if you know what I mean..... :wacko:

 

All Done...

 

Hope this helps!

I try this method and change the permission of product image file to 777. It seems ok. I can link the file successfully but there's error message "Warning: chmod(): Operation not permitted in /home/toylala/public_html/try/admin/includes/classes/upload.php on line 95"

 

What's that mean? And, I find that permission of product image files in demo are 755 but I can't link my own files if I set them to 755. They must be set to 777.

Link to comment
Share on other sites

  • 10 months later...

I've try that one, there's no error but apparently the image keep uploading to the /images dir not the /image/new_folder dir

 

Does anyone has a better and more simple suggestion?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...