CSV import issues

  • Posts: 23
  • Thank you received: 0
9 years 7 months ago #196523

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28

Hi,

i have 2 issue when i want to import procuts from a CSV file. It's not a backup but rather generated on the fly from various sources to create products int eh shop.

The first issue is if the product category name contain a colon multiple categories are created. Is it possible to prevent this to keep the colon in the category name?

Second issue:
I want to also import product images. The CSV column is named "images" and the values jsut contain the image name (lower-case, no spaces). Then i upload the images via FTP to "JOOMLA_ROOT/images/com_hikashop/upload" but the image is not displayed on the product page.
I debug into the view's code and figured out that

$img = $this->image->getThumbnail(@$image->file_path, array('width' => $width, 'height' => $height), $image_options);
if($img->success) {  //<--- false
//display image code
}
is unsuccessful.
When i disable thumbnails in the Hikashop configuration the image is displayed.

So what do i have to do to get the thumbnails working? What may cause that $img>success fails?
Do i have to create the thumbnails in my case myself and also upload them?

thanks in advance.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196537

Hi,

1. This allows you to attach several categories to a product during the import.
What you can do is change the line:
$this->_separate($product->categories);
to:
$product->categories = array($product->categories);
in the file administrator/components/com_hikashop/helpers/import.php and that will deactivate that capability for the categories column and you should not have the problem with category names with commas.

2. HikaShop generates the thumbnails automatically. No need for you to do that.
However, this requires that HikaShop/joomla has write access to the folder images/com_hikashop/upload.
If HikaShop cannot generate the thumbnails in that folder (in subfolders actually), the $img->success attribute will be set to false.
So please check on that folder and make sure that it is writable.

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

  • Posts: 23
  • Thank you received: 0
9 years 7 months ago #196574

nicolas wrote: Hi,
2. HikaShop generates the thumbnails automatically. No need for you to do that.
However, this requires that HikaShop/joomla has write access to the folder images/com_hikashop/upload.
If HikaShop cannot generate the thumbnails in that folder (in subfolders actually), the $img->success attribute will be set to false.
So please check on that folder and make sure that it is writable.


i've set the permissions of images/com_hikashop/upload (and all sub-folders) event to 0777, but the result is unchanged. The thumbnail still doesn't display.
Is there another case where $img->success is false?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196597

So did you get the thumbnails folder and the files in it created by HikaShop ?
Other possibilities would be that HikaShop cannot generate thumbnails out of your images because of a strange format of the image, not enough space on the hard drive, a FTP layer activated but configured incorrectly in the Joomla configuration, the GD library not installed on your server or not activated or not supporting the format of your images. That's all I can think of.

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

  • Posts: 23
  • Thank you received: 0
9 years 7 months ago #196625

there are a few thumbnail folders. Don't know which one is the correct one.
Are the thumbnails created on the fly when the image is first requested? If yes i can delete the thumbnail folders and open up the product page and the thumbnails should be created right?

I'll check the other points you mentioned.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
9 years 7 months ago #196650

Hi,

Yes, the thumbnails are generated on the fly. So you can delete all the thumbnails folders and it should recreate them with the thumbnails in it when necessary.

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

  • Posts: 23
  • Thank you received: 0
9 years 7 months ago #196703

i solved it. I've turned on the error reporting in Joomla config.
Then the error message appeared that the JPEG data is invalid. Which is kinda odd because it displays fine in every other viewer.
Nevertheless i now reconvert the images before uploading and it works now.

thank for your hints!

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

Time to create page: 0.040 seconds
Powered by Kunena Forum