- Posts: 44
- Thank you received: 1
Updating a category image
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.
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.
Category images are not supported in the import for now.
Please Log in or Create an account to join the conversation.
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.
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.
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.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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.
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.
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.
We are using Joomla 1.7.3
PhilP
Please Log in or Create an account to join the conversation.
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.
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.