Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Categories Images Box support thread


kymation

Recommended Posts

This contribution uses different images than the rest of your site. See your Admin Categories/Products page and edit the categories to add these images.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • Replies 204
  • Created
  • Last Reply

Top Posters In This Topic

Hi Jim,

 

I checked all of the admin/categories.php code again.

 

When I right click on one of the categories on the index page, to see why the image isn't loading, (but the link and text load) I get a 403 forbidden error.

 

I right clicked to "view image" and that's what comes up.

 

Do I need to change permissions? Which file is trying to access the images directory?

 

I'm usually pretty decent at troubleshooting, but I'm stumped on this one.

 

Thank you again for your time,

 

Jason

Link to comment
Share on other sites

That's a new one. I suspect the code is looking for the image in the wrong place. Look at the source in your browser to see where it's pointing. That should tell you where the code is messing up.

 

Regards

Jim

Edited by kymation

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Hi

 

Thanks for your reply. Can i change this setting in mysql-front? or how do i do it? do i need to speak to my hosting company? sorry if it is a stupid question.

 

many thanks

Trying this again .... I don't know how to do this in mysql-front. You could check the website for that application, or ask your hosting service for help with it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Trying this again .... I don't know how to do this in mysql-front. You could check the website for that application, or ask your hosting service for help with it.

 

Regards

Jim

 

Hi

I fixed the information_schema thing i understand now, thanks. However the problem i have got has not been fixed. When i add a new category i get the following error:

 

1364 - Field 'categories_image_front' doesn't have a default value

 

insert into categories (sort_order, parent_id, date_added) values ('0', '0', now())

 

[TEP STOP]

 

 

I originally throught it was to do with me not running the sql code but now i know thats not the case because i had run it. Can you shine some light on this?

 

Thanks in advance

Link to comment
Share on other sites

It's adding blank data to the database. You have an error in you code somewhere in catalog/admin/categories.php. Check your edits carefully.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

It's adding blank data to the database. You have an error in you code somewhere in catalog/admin/categories.php. Check your edits carefully.

 

Regards

Jim

 

Hi Jim

 

Thanks for your quick response.

 

I had a carefull look at catalog/admin/categories.php but all apears to be correct sadly. I have noticed a difference in my categories / products page . The category image call box shows TEXT_CATEGORIES_IMAGE_FRONT instead of category images box image. However I can still upload images. Can you give me any suggestions? Thanks

Link to comment
Share on other sites

http://www.oldfoundry.com/catalog/images/

 

and that's the regular images directory, all the images work except for the ones called by Categories Images Box.

 

If you click on the categories on the left, or from the Categories Images Box, the images will show up when going to the link.

 

It's got to be something I'm simply overlooking.

 

Jason

 

 

 

That's a new one. I suspect the code is looking for the image in the wrong place. Look at the source in your browser to see where it's pointing. That should tell you where the code is messing up.

 

Regards

Jim

Link to comment
Share on other sites

Weirder yet. Categories Images Box uses the standard osCommerce function for images, so there shouldn't be any difference. Sorry, I'm out of ideas here.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

No problem Jim,

 

I'll try to see if anyone knows on the oscommerce forum.

 

Thanks again for making such a good contribution, I know this would work fine if I had done it on a new install.

 

Jason

 

Weirder yet. Categories Images Box uses the standard osCommerce function for images, so there shouldn't be any difference. Sorry, I'm out of ideas here.

 

Regards

Jim

Link to comment
Share on other sites

You could. It would take some modification of the code, but not that hard to do.

 

Do you really want to do this? It could slow your front page down if the other site is slow, or break it if the other site goes down. Why not just host the images on your own server? Maybe there is some benefit to this, but I'm just not seeing it.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

You could. It would take some modification of the code, but not that hard to do.

 

Do you really want to do this? It could slow your front page down if the other site is slow, or break it if the other site goes down. Why not just host the images on your own server? Maybe there is some benefit to this, but I'm just not seeing it.

 

Regards

Jim

Hi Jim, thanks for replying!

Yes, I need to do that. What i actually need to do is to grab a image from a remote link location or local location and put the image to the respective catalog/categories of the product with option to change directory of the image. The other details of the product were keying into a Excel spreadsheet and the input to database by using the contribution - Easy Populate (EP), to include the remote image link location (url) for the product image. Just imagine when you have more than 1000 plus of products to input to database.

Could you please show me how to modify the code to achieve this?

I have been trying a number of way without success. :(

In actual fact i saw this contribution http://addons.oscommerce.com/info/4920 and i tried to used the automatically import images from URLs function but cannot get import of image done as i'm using EP to import my rest of the data.

Tried modifying the code and searched the forum for solutions but failed. As i'm only a beginner in php and osCommerce therefore no experience in php coding!

Thank you in advance and you are the best! :lol:

Link to comment
Share on other sites

Hi Jim

 

Thanks for your quick response.

 

I had a carefull look at catalog/admin/categories.php but all apears to be correct sadly. I have noticed a difference in my categories / products page . The category image call box shows TEXT_CATEGORIES_IMAGE_FRONT instead of category images box image. However I can still upload images. Can you give me any suggestions? Thanks

 

 

Hi Jim

 

I have started a fresh and reloaded oscommerce and files from scratch then copied all the file in the contribution across to my ftp. The sql code has been run and appears to have created the tables ok but i still get the error message below when i create a new product. Do you have any suggestions to what else it could be i am at a real loss and pulling hair out.

 

 

1364 - Field 'categories_image_front' doesn't have a default value

 

insert into categories (sort_order, parent_id, date_added) values ('0', '0', now())

 

[TEP STOP]

 

Kind Regards

Link to comment
Share on other sites

<snipped>

1364 - Field 'categories_image_front' doesn't have a default value

 

insert into categories (sort_order, parent_id, date_added) values ('0', '0', now())

 

[TEP STOP]

This has to be some sort of MySQL setting. I don't get that error. Since it's complaining about default vlues, try setting a default of NULL for the 'categories_image_front' filed. Maybe that will make it shut up.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Do you mean to call the remote image from your pages, or to import the image to your own server? There's quite a difference.

 

Regards

Jim

Both ways which you mention would be good but we could start with call the remote image from the page. :lol:

Edited by lightshine
Link to comment
Share on other sites

You'd need to make quite a few changes. Every page that shows a product image uses the tep_image() function. This will have to be removed, along with the constant that stores the location of the images directory. You need to replace that code with the link to your remote site (Probably stored in another constant) and the image from the database. This is going to be a lot of work. Have fun.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

You'd need to make quite a few changes. Every page that shows a product image uses the tep_image() function. This will have to be removed, along with the constant that stores the location of the images directory. You need to replace that code with the link to your remote site (Probably stored in another constant) and the image from the database.

But if i choose to import in the image from remote site to store to the location of images directory, how to do it? I'm new to osc and php, please guide me along! Thank you!

Link to comment
Share on other sites

It would probably be better to import the images. If you are using Easy Populate or the CSV contribution, you should be able to modify those to pull remote images. I'm not familiar with either of those contributions, so you'd be better off asking in the support thread for the one that you want to use.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

It would probably be better to import the images. If you are using Easy Populate or the CSV contribution, you should be able to modify those to pull remote images. I'm not familiar with either of those contributions, so you'd be better off asking in the support thread for the one that you want to use.

I tried to ask on the forum for the support thread for Easy Populate, they replied saying that they wouldn't support the feature that i request for to pull image from remote location (just like the easy cvs import contribution). :( Am i asking too much for that?

Link to comment
Share on other sites

Possibly. This is likely to be of interest to very few people. You may be the only one. If so, you'll probably have to do it yourself or hire someone to code it for you. Or just do without. I'm not trying to discourage you, but that's sometimes the way it is here.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

This has to be some sort of MySQL setting. I don't get that error. Since it's complaining about default vlues, try setting a default of NULL for the 'categories_image_front' filed. Maybe that will make it shut up.

 

Regards

Jim

 

Worked a treat! Very pleased

Many thanks

sarah

Link to comment
Share on other sites

I am having the same problem as some others are having with this contrib.

 

I am Using RC2a

 

The categorie box is showing on the index and so are the poduct names etc. everything seems to be working accept the categorie images dont show on the index page ? (the sub categorie images are showing when clicking further)

 

When I add the images trough the admin (CMS) they are visible and they are also in my catalog/images folder but not visible on the main index of the website i see a little red cross instead of the images

 

This is what I see when I right click the image: http://mywebsite/catalog/images/

 

Is there any solution for this problem hope someone can help to fix this minor prob

Edited by Mr.JTX
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...