Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Images in Subdirectories


CTE_Shopping

Recommended Posts

I have loaded nearly 800 images into my catalog. These files were stored, by default, in the following directory path: / home / public_html / osCommerce / catalog / images -> http: //cteshopping.com/osCommerce/catalog/images

 

I am now getting the following message:

This directory contains more than 500 items. Please consider organizing your files into sub-directories. To avoid performance problems with the admin system, I will only present the first 500 items here for edit. If you wish to keep things as they are, please consider using an FTP client for file management. hummmm... that feels like another slap on the wrist for the newbie.

 

I know how to create a subdirectory and move an image file to the new subdirectory, but the image link to the product in the catalog is then broken and when I go to the catalog > product > upload image, I cannot load the file from the subcategory.

 

The only upload option I am given is to upload files from my computer. Is there a way to load the images from a source other than my computer, ie the subdirectories that I want to move the files to. It means changing about 700 product images manually. Any suggestions?

There are many failures on the road to success. We stumble over pebbles, not mountains. Never give up!

Link to comment
Share on other sites

I have loaded nearly 800 images into my catalog. These files were stored, by default, in the following directory path: / home / public_html / osCommerce / catalog / images -> http: //cteshopping.com/osCommerce/catalog/images

 

I am now getting the following message:

This directory contains more than 500 items. Please consider organizing your files into sub-directories. To avoid performance problems with the admin system, I will only present the first 500 items here for edit. If you wish to keep things as they are, please consider using an FTP client for file management. hummmm... that feels like another slap on the wrist for the newbie.

 

I know how to create a subdirectory and move an image file to the new subdirectory, but the image link to the product in the catalog is then broken and when I go to the catalog > product > upload image, I cannot load the file from the subcategory.

 

The only upload option I am given is to upload files from my computer. Is there a way to load the images from a source other than my computer, ie the subdirectories that I want to move the files to. It means changing about 700 product images manually. Any suggestions?

 

 

 

 

Hello, really I don't understand the last part, or your solution (how?)

 

My advice is study these two contribution:

 

1) image_subdirectories

2)categories_images_folder_treeV1.2

3) The instruction in the oscommerce with the slashes / before the image; But I am not sure that go.

 

Read carefully, for example the first contribution demanded this:Some issues

-------------------------------------------------------

1) Register Globals enabled or not

2) php4 does not support recursive mkdir, php5 does

3) ownership of created directories

4) permissions of created directories

5) backslash vs forward slash for the mkdir() function

 

I don't know different ways,

 

feel free to ask a question, if a can of course. Make a backup first.

 

For fast comunication my email is: [email protected]

 

Nelson

Link to comment
Share on other sites

Nelson,

Thank you for your response. I guess I wasn't clear in my first post.

 

1) The DEFAULT for posting an image in the catalog opens a window to your hard disk to load a photo.

 

2) The hard disk photo is loaded into oscommerce/catalog/image which is the DEFAULT file set up in the startup oscommerce catalog

 

I fully understand how to create a new subdirectory in the catalog file directory and I know how move a file that went to the DEFAULT image file to the new subdirectory in the catalog image files. What I don't know how to do is how to link that image in the subdirectory to the product using the image upload window when for the product.

 

Example:

I created a product in the catalog and loaded a file from my hard drive named Teddy.jpg. The file is automatically, by DEFAULT, placed into the oscommerce/catalog/images/Teddy.jpg

 

I created a subdirectory named new_images and move the Teddy.jpg to the new subdirectory oscommerce/catalog/images/new_images/Teddy.jpg

 

The questions is HOW CAN I LINK THE IMAGE FILE TO SUBDIRECTORY? The default for the products image drop down window is the USER'S HARD DRIVE.

 

I have been reading manuals, bulletin boards and even doing tutorials. This problem was not addressed in anything that I have read so far. I will be happy to read, study and learn about possible solutions if you have recommended links on your list of suggested readings.

 

Your assistance is sincerely appreciated.

There are many failures on the road to success. We stumble over pebbles, not mountains. Never give up!

Link to comment
Share on other sites

Nelson,

Thank you for your response. I guess I wasn't clear in my first post.

 

1) The DEFAULT for posting an image in the catalog opens a window to your hard disk to load a photo.

 

2) The hard disk photo is loaded into oscommerce/catalog/image which is the DEFAULT file set up in the startup oscommerce catalog

 

I fully understand how to create a new subdirectory in the catalog file directory and I know how move a file that went to the DEFAULT image file to the new subdirectory in the catalog image files. What I don't know how to do is how to link that image in the subdirectory to the product using the image upload window when for the product.

 

Example:

I created a product in the catalog and loaded a file from my hard drive named Teddy.jpg. The file is automatically, by DEFAULT, placed into the oscommerce/catalog/images/Teddy.jpg

 

I created a subdirectory named new_images and move the Teddy.jpg to the new subdirectory oscommerce/catalog/images/new_images/Teddy.jpg

 

The questions is HOW CAN I LINK THE IMAGE FILE TO SUBDIRECTORY? The default for the products image drop down window is the USER'S HARD DRIVE.

 

I have been reading manuals, bulletin boards and even doing tutorials. This problem was not addressed in anything that I have read so far. I will be happy to read, study and learn about possible solutions if you have recommended links on your list of suggested readings.

 

Your assistance is sincerely appreciated.

 

Hello,

 

The last year I tried to do the same thing that you say but no match, anyway I tell you the new instruction, but now I think is because the PHP is below version 5. (anyway tried).

 

Tried first with the instruction in: documentation.pdf page 110 in this address:

 

http://svn.oscommerce.com/trac/browser/oscommerce2/trunk

 

 

Remember Backout first.

 

Nelson

Link to comment
Share on other sites

My only suggestion would be to use something like easy populate 2.76 - download your database to a tab delimited text file. Next - reupload all of your images manually into images/subfolder1 and images/subfolder2 etc..

Sort your images manually that way. Then, edit your tab delimited file. Your image names will be listed there for each product. For example: dvd-a_bugs_life.jpg

If you had reuploaded dvd-a_bugs_life.jpg to images/dvd/ then you would change your image location in the tab delimited file to

/dvd/dvd-a_bugs_life.jpg

 

quite tedious but it will work. I am having to format my database this way right now for setup of my store. Luckilly I can sort my products into categories using excel so that I can 'batch' add /DVD/ or /blu-ray/ to each image location.

 

 

 

Hello,

 

The last year I tried to do the same thing that you say but no match, anyway I tell you the new instruction, but now I think is because the PHP is below version 5. (anyway tried).

 

Tried first with the instruction in: documentation.pdf page 110 in this address:

 

http://svn.oscommerce.com/trac/browser/oscommerce2/trunk

Remember Backout first.

 

Nelson

Link to comment
Share on other sites

My only suggestion would be to use something like easy populate 2.76 - download your database to a tab delimited text file. Next - reupload all of your images manually into images/subfolder1 and images/subfolder2 etc..

Sort your images manually that way. Then, edit your tab delimited file. Your image names will be listed there for each product. For example: dvd-a_bugs_life.jpg

If you had reuploaded dvd-a_bugs_life.jpg to images/dvd/ then you would change your image location in the tab delimited file to

/dvd/dvd-a_bugs_life.jpg

 

quite tedious but it will work. I am having to format my database this way right now for setup of my store. Luckilly I can sort my products into categories using excel so that I can 'batch' add /DVD/ or /blu-ray/ to each image location.

 

Thank you Nelson and Justin for trying to help. I have to admit when I sent to the link you both gave me I did not see any line numbers that enabled me to find the file number. I will need a more specific link that does not considered line numbers.

 

Justin, that was a great suggestion! I have a little experience with the tab deliminated files, downloads and uploads, but as you say this would be extremely time consuming to do. It is a great suggestion and gives me one alternative to the problem. I am so new with oscommerce that I don't want to risk it for the moment.

 

For clarification..... The changes I am making are through the FILES MANAGEMENT module and not within the normal store catalog. I just can't believe that a osCommerce doesn't have a simple solution to this problem. It has vast outreach and very active store owners. Someone must have encountered this problem and resolved it.

There are many failures on the road to success. We stumble over pebbles, not mountains. Never give up!

Link to comment
Share on other sites

Thank you Nelson and Justin for trying to help. I have to admit when I sent to the link you both gave me I did not see any line numbers that enabled me to find the file number. I will need a more specific link that does not considered line numbers.

 

Justin, that was a great suggestion! I have a little experience with the tab deliminated files, downloads and uploads, but as you say this would be extremely time consuming to do. It is a great suggestion and gives me one alternative to the problem. I am so new with oscommerce that I don't want to risk it for the moment.

 

For clarification..... The changes I am making are through the FILES MANAGEMENT module and not within the normal store catalog. I just can't believe that a osCommerce doesn't have a simple solution to this problem. It has vast outreach and very active store owners. Someone must have encountered this problem and resolved it.

 

 

I full agree with you.

 

The only one contribution that I know specifically for this is:

 

http://www.oscommerce.com/community/contri...folder_treeV1.2

 

The name that I told you is: categories_images_folder_treeV1.2

 

That I wrote, when I tried last year the contribution no work, but now there is an update from 11 Sept -2006. The new one never I tried to instaled before.

 

Did You see the official instruction page 110, that I tell you in my last post?

 

Cheers

Link to comment
Share on other sites

Did You see the official instruction page 110, that I tell you in my last post?

 

Cheers

I too have been trying to get images into sub image folders. I HAVE read

page 110 of the manual but it is written wrong and simply doesn't work.

 

Many people ask for this work-around and it shouldn't be such a problem. Especially when

I have read about a 500 image limit in the default image folder

Link to comment
Share on other sites

MagickWomyn, that is EXACTLY what I was looking for. I downloaded the file and I will give it a try tomorrow. Thank you so much. This is a feature that I wish osCommerce would add to their basic package. I really appreciate your help. I will let you know how the add-on works.

There are many failures on the road to success. We stumble over pebbles, not mountains. Never give up!

Link to comment
Share on other sites

MagickWomyn, that is EXACTLY what I was looking for. I downloaded the file and I will give it a try tomorrow. Thank you so much. This is a feature that I wish osCommerce would add to their basic package. I really appreciate your help. I will let you know how the add-on works.

 

Don't forget to study the issues for this contribution (extract my post 1)

 

"1) image_subdirectories

 

Read carefully, for example the first contribution demanded this:Some issues

-------------------------------------------------------

1) Register Globals enabled or not

2) php4 does not support recursive mkdir, php5 does

3) ownership of created directories

4) permissions of created directories

5) backslash vs forward slash for the mkdir() function "

 

Nelson

Link to comment
Share on other sites

SUCCESS!

 

:D I want to thank everyone who helped me resolve the images problem. I finally figured out that Nelson was telling me to look at page 110 of the osCommerce MANUAL that can be downloaded in PDF format. I read page 110 over and over and was never able to get it to work the way they suggested.

 

The link that MagickWomyn suggested was the answer I needed and here is how I resolved my image subdirectory problem:

  1. I downloaded the images add-on file posted at http:/www.oscommerce.com/community/contri...earch,image+sub
  2. I use the vDeck panel and I changed the name of the admin/categories.php file to admin/categories_old.php
  3. I uploaded the new enhanced images file categories.php into the admin folder
  4. I held my breath and went to the Administration Console for my store to see if the change too affect I there was a new line above the image line in my catalog product item.
  5. I tested the file by typing in the name of a new directory. In this instance it was images/cups/ and put a checkmark in the box on the right of the line to indicate this was the path where I wanted the image placed.
  6. Next I went to the next line which is the original IMAGE box that uploads the image from your hard drive.
  7. I selected the file adderlycup.jpg and hit preview and the file uploaded to the directory as images/cups/adderlycup.jpg
  8. I checked the name underneath the image and sure enough the file name was images/cups/adderlycup.jpg

The other thing I wanted to do with images was place additional images on my products page. Serendipityretail suggested placing the following html to your product description: <img src+"www.yourdomain.com/location of your image.gif>

 

On to my next challenge! Big thank you's to Nelsonevp, MarcM, JustinC and MagickWomyn!

There are many failures on the road to success. We stumble over pebbles, not mountains. Never give up!

Link to comment
Share on other sites

Congratulation Sharron, You do a great work, Now I know you have the same host that mine.

And I imagine the red announce disappear because below 500 images.

 

I save yours instructions, and in the future I will be used.

If any day I have a question about this area, I will demand your assistance.

 

Regards,

Nelson

Pd. I don't know if the word "demand" is correct, in case not I am sorry.

 

 

SUCCESS!

 

:D I want to thank everyone who helped me resolve the images problem. I finally figured out that Nelson was telling me to look at page 110 of the osCommerce MANUAL that can be downloaded in PDF format. I read page 110 over and over and was never able to get it to work the way they suggested.

 

The link that MagickWomyn suggested was the answer I needed and here is how I resolved my image subdirectory problem:

  1. I downloaded the images add-on file posted at http:/www.oscommerce.com/community/contri...earch,image+sub
  2. I use the vDeck panel and I changed the name of the admin/categories.php file to admin/categories_old.php
  3. I uploaded the new enhanced images file categories.php into the admin folder
  4. I held my breath and went to the Administration Console for my store to see if the change too affect I there was a new line above the image line in my catalog product item.
  5. I tested the file by typing in the name of a new directory. In this instance it was images/cups/ and put a checkmark in the box on the right of the line to indicate this was the path where I wanted the image placed.
  6. Next I went to the next line which is the original IMAGE box that uploads the image from your hard drive.
  7. I selected the file adderlycup.jpg and hit preview and the file uploaded to the directory as images/cups/adderlycup.jpg
  8. I checked the name underneath the image and sure enough the file name was images/cups/adderlycup.jpg

The other thing I wanted to do with images was place additional images on my products page. Serendipityretail suggested placing the following html to your product description: <img src+"www.yourdomain.com/location of your image.gif>

 

On to my next challenge! Big thank you's to Nelsonevp, MarcM, JustinC and MagickWomyn!

Link to comment
Share on other sites

...I know how to create a subdirectory and move an image file to the new subdirectory, but the image link to the product in the catalog is then broken and when I go to the catalog > product > upload image, I cannot load the file from the subcategory.

 

...Any suggestions?

I know you've found a solution to your problem, but in case anyone else is interested, I thought I would plug EDFT (Easypopulate Data File Tools). You can find it here...

 

http://www.oscommerce.com/community/contributions,2067

 

This is a set of scripts which (if you use easypopulate) will do just what you were asking. It actually contains scripts for doing all sorts of stuff but one of the things it will do is auto-generate the links to your images and add these into the easypopulate data, thus avoiding lots of tedious manual editing of the easypopulate data. To compliment this, it also contains some image scaling scripts so you can get your images just the right size, and is just the ticket when you have multiple images for your products because you can create thumbnails and big images from the same source, saving DAYS in the process. All the scripts involved work very well (indeed they were specifically designed to work) with nested directory structures.

 

One last thing - I found that in reality, many of the EP fields can be auto-generated or are blank. I cut down the complexity of my EP data by only editing a subset of the data (in a spreadsheet) and then using the EDFT tools to import this "foreign" data into the EP format; auto-generating the missing fields automatically. Again, saving many tedious hours.

 

Anyway, plug over

 

Rich.

Link to comment
Share on other sites

  • 3 months later...

Archived

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

×
×
  • Create New...