Automated CSV import via chron on subdirectory to test

  • Posts: 87
  • Thank you received: 5
  • Hikashop Business
5 years 5 months ago #307420

-- HikaShop version -- : 4.1.0
-- Joomla version -- : 3.9.6 Stable
-- PHP version -- : 7.1.29

I am trying to configure the automated import of products from a CSV file. This CSV file is supplied by a partner and I am using a piece of custom PHP to select only some items in the complete CSV file from a specific product category to pass to Hikashop. The PHP that outputs the selected products as CSV works, but I run into an issue when trying to import them into Hikashop.

According to the documentation ( www.hikashop.com/support/documentation/73-hikashop-import.html ) I need to configure the Hikashop cron options to be able to automate import. However, because I do not want to run the risk to mess up my live site while I am still experimenting with importing products from a CSV (which is new to me), I have made a clean install of Joomla with Hikashop in a sub-directory of my main domain. My Hikashop Business subscription is attached to my domain, but when I try to configure cron for this clean install in this sub-directory of my domain, I get the error message:
"The web cron is a service we propose to our subscribers based on the website attached to their subscription.
You do not seem to have an available subscription for the website ***. Please login on your account to manage your subscription."

Is there any way to run this cron task from this Joomla/Hikashop install in a subdirectory of my domain? I really do not want to have to test this in my live site, because i first want to see how the mapping of columns is performed and how easy it is in practice to add and remove products this way without messing with my large) list of products in the live site.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
5 years 5 months ago #307447

Hi,

There are two things you can do:
First and foremost, before testing your CSV with the HikaShop product cron update plugin, I would recommend to test it with the Products>Import menu. There, you'll easily get the error messages, and you don't need the cron.
The only difference is that you need to change the column names manually in the CSV before the import while the cron plugin has an option to dynamically change the column names during the import.
Once your CSV imports correctly via the Products>Import menu, your CSV is correct and you just have to configure the plugin properly and activate the cron task. So there are two things you can do for that:
- you can temporarily change the domain of your website in the my account>my subscriptions menu on our website. You can change that URL several times for each version of HikaShop. Besides the cron task (and the functions associated with it), the rest of HikaShop on your live website will still work properly.
- you can just get the cron URL from the HikaShop configuration and open it with your browser to trigger the cron manually. That's even better as you'll directly see the errors on the page without having to check the reporting of the cron task system. So I would recommend doing that.

The following user(s) said Thank You: Foxworks

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

  • Posts: 87
  • Thank you received: 5
  • Hikashop Business
5 years 5 months ago #307448

Hi Nicolas,

Thanks for the clear and detailed explanation. I'm going to try your suggestions later this week.

Best regards,
Chris

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

Time to create page: 0.061 seconds
Powered by Kunena Forum