Cron job to create images

  • Posts: 232
  • Thank you received: 4
  • Hikaserial Standard Hikashop Business
3 years 10 months ago #332400

-- HikaShop version -- : 4.4.2 Business Edition
-- Joomla version -- : 3.9.26

Hello,
I'm using HikaShop in a rather unique way. My client uses an in house FileMaker Pro database for their parts and products. We have setup a connection into the HikaShop database tables to insert this product data directly into the required tables. It all works very well.

However, we have an issue with the images, as the products are not generated in Hikashop and the image uploaded at the same time, we are struggling to get a working solution. Currently, the images are uploaded directly to:

media/com_hikashop/upload/

And using template overrides they are then referenced from this folder.

Is it possible to use some sort of cron job to run automatically and generate the correct thumbnails etc for each of the products?

Thanks

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

  • Posts: 83403
  • Thank you received: 13497
  • MODERATOR
3 years 10 months ago #332403

Hi,

If you generate the product data in the database, why not also add the image entry in the hikashop_file table ? That way, the images will be normally linked to the products, and you can use the default system to display them and generate the thumbnails.

There is no mechanism to generate the thumbnails from the main images in HikaShop. The system is made to generate the thumbnails when they need to be displayed only.

The simplest would be to find a PHP script already written by someone to generate the thumbnails with your server cron task. For example, a quick search on Google gives me this:
gist.github.com/beporter/45f16185e2fe8f186e29

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

Time to create page: 0.053 seconds
Powered by Kunena Forum