chrometweaks.org

What's the best web iPage hosting service?

Click Here To View All Answers...


First off, What's the best web iPage hosting service? Hoping for any response. Another question... I got no way to store the product's images in their own categories and make them show up. Please help!.

I have 4 categories, I have to store all product's images in images directory only in order to display them. If I move them to images/categories1/ or images/categories2/ the images won't show up anymore. no matter what path I put in Admin > Catalog > Categories/Products area..

Thanks for your help...

Comments (128)

Hmm... I need to find out myself. I don't know what is the answer to your question. I'll do some Googling and get back to you if I find an good answer. You should email the people at iPage as they probably could answer your iPage question..

Comment #1

Actually I cannot make the change successfully. When I edit the product in admin area, no matter what path I put in, nothing will be changed or I should say no change will be saved. I even tried to put the whole web address of the image in, but still cannot change the path and cannot save the path, of course cannot display too..

Here is my site.

Everything fine when the images store in images directory, but not in any sub directory inside the images. That's make very hard for me to manager those images...

Comment #2

Hi,.

You don't have _any_ paths under the images path ??.

Peter..

Comment #3

You can create the directories under images, they all need to be RWX permissions, (777) and then it works..

So a little lesson here, if a directory needs to be 777, any subsequent directories under it need to be 777 (at least for osCommerce)..

Comment #4

I know I can create the sub directories under images, but the problem is the new path won't be updated through admin>edit product...

Comment #5

Hi,.

Would the complete path be too long ? Although the db schema has the data type as:.

Products_image varchar(64),.

/images/necklace/200461115145976814.jpg.

And the above is only 41 chars..

Just a thought anyway..

Peter..

Comment #6

Hi,.

Checked in admin, where it inserts or updates products:.

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']);.

         }.

Anything there that would cause the problem ? As John stated, is the sub path a 777 ? .

Peter..

Comment #7

I changed the permission of images and images/necklace directories from 755 to 777. new path point to sub-directory under images still won't be updated. I can change the path point to any other images store in images directory, just not sub-directory...

Comment #8

I don't know if this will help, but I just uploaded a contribution to basically automatically create folders under the /catalog/images folder based on when you create categories and then places the products image inside the appropriate folder..

So if you have your categories as such:.

Cat 1.

Sub Cat 1-1.

Sub Cat 1-2.

Sub Cat 1-2-1.

Sub Cat 1-3.

Cat 2.

Your images folder would then look like:.

\catalog\images\cat_1.

\catalog\images\cat_1\sub_cat_1-1.

\catalog\images\cat_1\sub_cat_1-2.

\catalog\images\cat_1\sub_cat_1-2\sub_cat_1-2-1.

\catalog\images\cat_1\sub_cat_1-3.

\catalog\images\cat_2.

And the products image would go in the folder that matches the category..

Here's the contribution:.

Http://www.oscommerc...tributions,2409..

Comment #9

Hi,.

Use phpmyadmin, and update the PRODUCTS table, for the row that has the image in the sub path, and see if that works..

Peter..

Comment #10

Tried. It works! Thank you! but is there any other way I can keep the new path? it's hard to update all images' new path one by one from database...

Comment #11

Hi,.

Good that it works, and yes, you don't want to have to do that all the time..

1. Make usre you have a 'good' copy of /catalog/admin/categories.php , by uploading it again..

2. When you try to add an image with a 'sub path' under admin, can you try the "preview" button, to see if that works..

3. There could be some server settings or other config. issues with your iPage website (I'm totally guessing here, but we have a few sub paths, and it all works fine). When I went to the /images folder, the display was , to me, "non standard"..

4. Search the file /catalog/admin/categories.php , for the string 'image' , and try and become familiar with how PHP/osCommerce does the db update for images. I did post some code, and these few lines just after, lines 237 to 243 is where the update is done:.

         } elseif ($action == 'update_product') {.

           $update_sql_data = array('products_last_modified' => 'now()');.

           $sql_data_array = array_merge($sql_data_array, $update_sql_data);.

           tep_db_perform(TABLE_PRODUCTS, $sql_data_array, 'update', "products_id = '"(int)$products_id"'");.

         }.

5. It wouldn't hurt to add a line or 2 of code just before the tep_db_perform() function, to dump the array ($sql_data_array) , and then you will see if the image sub path is contained within the array..

Hope that helps,.

Peter..

Comment #12

I got no way to store the product's images in their own categories and make them show up. Please help!.

I have 4 categories, I have to store all product's images in images directory only in order to display them. If I move them to images/categories1/ or images/categories2/ the images won't show up anymore. no matter what path I put in Admin > Catalog > Categories/Products area..

Thanks for your help...

Comment #13

Hi,.

Are the path permissions the same for /images and /images/categories1 ??.

When the images do not show, are your web server logs showing a 404 error on the images, or a '300 series', like a 302 message ? .

When the images do not show, what path is showing in the link (usually right click/show link location, in your browser, when mouse is positioned over the image)..

Peter..

Comment #14


This question was taken from a support group/message board and re-posted here so others can learn from it.