Import csv with Store images locally = Yes results in errors

  • Posts: 65
  • Thank you received: 5
  • Hikashop Business
3 weeks 5 days ago #322020

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Warning: get_headers(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

Warning: get_headers(): This function may only be used against URLs in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

Warning: array_change_key_case() expects parameter 1 to be array, bool given in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

Hi I am trying to import a csv file with some links to images on an external site - I want the images to be stored on my website after import.
Store images locally = Yes
Here is an example line from the csv file

product_name product_code product_meta_description images parent_category categories
AB136 Aero Bath Screen AB136 Aero Bath Screen AB136 Aero Bath Screen www.matrixbathroomsandheating.com/upload...69_p12_i1_w1036.jpeg Bathrooms Shower Enclosures

On uploading the file i get the error described
Warning: get_headers(): https:// wrapper is disabled in the server configuration by allow_url_fopen=0 in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

Warning: get_headers(): This function may only be used against URLs in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

Warning: array_change_key_case() expects parameter 1 to be array, bool given in /home/xxx/newsite.xxx.com/administrator/components/com_hikashop/helpers/import.php on line 1119

I checked my php.ini file and can confirm allow_url_fopen = On (should this be 1 maybe?)

When i set Store images locally = No and import the csv file imports with no errors.
Any ideas please?

Last edit: 3 weeks 5 days ago by huwhuw.

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

  • Posts: 2647
  • Thank you received: 348
  • MODERATOR
3 weeks 4 days ago #322037

Hello,

We are sorry for this return, but we are afraid that we don't follow your idea, let's explain why :
"to import a CSV file with some links to images on an external site"
And in your message :
"When i set Store images locally = No and import the CSV file imports with no errors."

=> If you try to create a CSV (coded data) from your website WITH the option Store images locally option to "Yes" and from image stored externally the error return is quite normal, and note that the CSV creation process can't detect where the image are stored and that's why precisely you have this option.

Can you details your idea, and what astonished you from the CSV way to process please, awaiting news from you to guide you more precisely.
Regards

Last edit: 3 weeks 5 days ago by Philip.

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

  • Posts: 65
  • Thank you received: 5
  • Hikashop Business
2 weeks 4 days ago #322257

Thanks for the reply
I am trying to import images to a subfolder called Stoves
The path is /images/com_hikashop/upload/Stoves

My CSV images column is as below:

images
Stoves/Christon_550_Freestanding.jpg
Stoves/Christon_550_Logstore.jpg
Stoves/Christon_750_Freestanding.jpg

The images already exist in the Stoves Directory however on import the image link is broken.
I have tried this too:
/Stoves/Christon_550_Freestanding.jpg

How do i link product images to those in a sub-directory?

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

  • Posts: 70194
  • Thank you received: 10508
  • MODERATOR
2 weeks 3 days ago #322260

Hi,

First, please check the "upload folder" setting under the Files section of the Hikashop configuration.
If you have images/com_hikashop/upload/ there (which is the default), and you have an image with the path /images/com_hikashop/upload/Stoves/Christon_550_Freestanding.jpg then in your CSV file, you can reference that image under the "images" column with the value Stoves/Christon_550_Freestanding.jpg

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

  • Posts: 65
  • Thank you received: 5
  • Hikashop Business
2 weeks 3 days ago #322290

Thanks Nicolas,
The issue was duplicate product_code in the csv file which meant the images column was being ignored for those duplicate products. I removed the product_code column and the import worked perfectly

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

Time to create page: 0.058 seconds
Powered by Kunena Forum