Updating a category image

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #37629

Hi,
I have a number of categories in Hikashop which are now established and have products allocated to them etc.
Some categories have temporary category images; others have the default category image.
I now wish to allocate the final images to all categories using a csv import file and images which I have loaded into the image library media/com_hikashop/upload.

However, it seems that Hikashop does not allow me to overwrite the current category image file.

The datasets below illustrate the problem:

categories,categories_image
Category1,Image1.jpg

The dataset above will create Category1 and allocate/attach Image1 to it.
However, when I subsequently read in the dataset below, Category1 retains Image1 - it does not get replaced with Image2. Even if I manually delete Image1 and read in the import below, the default image is used rather than Image2.

categories,categories_image
Category1,Image2.jpg

I have about 30 categories to update so would prefer to do this using a csv import to update the images.

Please advise.
Thank You
PhilP.
(Hikashop Business 1.5.4)
(

Please Log in or Create an account to join the conversation.

  • Posts: 96
  • Thank you received: 14
12 years 11 months ago #37639

I'm having an issue very similar to yours.
I'm sure that this answer will help me to understand my problem too.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #37731

There is no categories_image column in CSVs for HikaShop.
Category images are not supported in the import for now.

Please Log in or Create an account to join the conversation.

  • Posts: 96
  • Thank you received: 14
12 years 11 months ago #37750

I don't understand, yesterday i downloaded the csv that listed all my categories and subcategories from my hikashop and i can see a column named categories_image then i tested by uploading the pictures to the upload folder and try to update the images on my categories and in my case it worked more or less as expected.

What do you mean with "There is no categories_image column in CSVs for HikaShop"?

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #37813

It is not correct to say that there is no categories_image column in the csv import option.
I have used it successfully to upload various category images. That is why I described the two datasets earlier.

The particular issue I am experiencing is that further use of categories_image does not update or overwrite the existing or default category image.

This is in contrast to the way that Hikashop import behaves with other data items, for example product_description.
Further use of product_description will create a new product description, overwriting an existing product description if one is already present.

I had hoped that categories_image would work in the same way but it appears not :-(

Phil P.

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #37976

Hi,

I checked the code and you're right, we added some code to handle the images when you create new categories.
However, the code doesn't handle the update of the category image.
The change to handle that is quite easy to implement. I've modified the code a uploaded a new version of 1.5.6 which should handle that now. If you can try it...

Please Log in or Create an account to join the conversation.

  • Posts: 96
  • Thank you received: 14
12 years 11 months ago #37996

So you're suggesting to download and istall again the 1.5.6 because the package have been just updated (un-officialy) with that improovement of the categories immage update from csv?

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #37998

Yes.

The following user(s) said Thank You: protorob

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #38010

Hi Nicolas,
I've installed 1.5.6 and tried the import routine again.
Creating a new category and attaching an image works OK.
Running the same data but changing the image name now generates an HTTP500 error message (the website cannot display the page). Recovering the site shows that after the second import the original image has been deleted and replaced by the default image.

categories,categories_image
test02,mickey_mouse-1097.jpg

The above import creates the test02 category and attaches the mickey mouse image.

categories,categories_image
test02,donald-duck-97.jpg

The second import generates the HTTP500 error message but deletes the mickey mouse image and replaces it with the Hikashop default image. The donald duck image does get attached.

Regards
PhilP

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #38022

Sorry,
That last line in my last post should have read:

The donald duck image does NOT get attached.


PhilP

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38119

Hi,

Thank you for the tests. Thanks to your report we found the problem.

Please download again the package, install and try again. It should work now.

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #38138

Downloaded and installed the latest version (still showing as 1.5.6) but unfortunately the problem is still there, still generating the HTTP500 error.

We are using Joomla 1.7.3

PhilP

Please Log in or Create an account to join the conversation.

  • Posts: 83103
  • Thank you received: 13415
  • MODERATOR
12 years 11 months ago #38228

It's working fine for us. Could you make sure that you downloaded the new package and not that your browser gave you a cached version of the file that he had stored in its cache ?
I don't see anything else which could still cause that problem.

If you still have that problem even after checking that. Please look in your php error log file for the real error message behind that HTTP 500 status error. That way, we will be able to understand why you have that and not us.

Please Log in or Create an account to join the conversation.

  • Posts: 44
  • Thank you received: 1
12 years 11 months ago #38825

thanks Nicolas,
I've had to move on to other tasks recently but will take a look at this when I get the opportunity and get back to you.
Rgds
PhilP

Please Log in or Create an account to join the conversation.

Time to create page: 0.088 seconds
Powered by Kunena Forum