General question about import/export capabilities

  • Posts: 634
  • Thank you received: 16
8 years 10 months ago #227083

-- HikaShop version -- : 2.6.0

I'm interested in linking two different HikaShop powered sites, one already existing, the other will be new custom made for this project, for which in the new site I would create my products and then they would be automatically exported to my hikaShop site or other clients sites also powered with HikaShop who want to share my products.

My question is about export / import capabilities in Mass Actions.

Can I do a fully export of my products from SITE A to another SITE B folder with a Mass Action and then in the SITE B have run a Mass Action that under a CRON trigger makes regularly imports of those exported products?

I understand that maybe automatic ID would not be compatible and maybe images cannot be transfered, but, waht would be the limits?

I have a vague understanding from some posts that Mass Action import/export is very powerful and could do this easily, but I am not sure I am right understanding this.

And is so, should this be made via CSV, Databases,... other method?

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

  • Posts: 13201
  • Thank you received: 2322
8 years 10 months ago #227162

Hi,

If your two websites are hosted on the same server, so the mass actions could be enough for this task.
It will allow to export a csv file with all the product datas on the server from SITE A, and then via another mass action on SITE B you can get this file content and import/update the product data directly.

The mass action on SITE B can indeed have a daily or hourly trigger to update the product informations regularly.
Regarding the images, this is not possible via the mass actions, we can update the paths but not the files themselves.

So this part will require a custom script.

And if your two sites are not on the same server, so the csv file will need to be transferred, potentially via SFTP protocol.

The actions needed would be like that:
SITE A = take.ms/1kjk2
SITE B = take.ms/kcxV1

ps: another action on the categories will maybe be required too.

The following user(s) said Thank You: PeterChain

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

  • Posts: 634
  • Thank you received: 16
8 years 10 months ago #227195

Great explanation. Thank you very much.

So mostly the limits are in image transfer in case I work with different servers, something I could fix with some non related script or by tweaking paths in the code.

Good that Mass actions are so powerful

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

  • Posts: 634
  • Thank you received: 16
8 years 9 months ago #228457

Xavier wrote: Hi,

It will allow to export a csv file with all the product datas on the server from SITE A, and then via another mass action on SITE B you can get this file content and import/update the product data directly.


To complement this explanation I have a couple more questions:

Can this be setup in a way that only the updated products (obeying an update True/False field, a date, or some other) are exported to CSV?

In the import side, wil the mass action be able to delete the CSV file once it has been imported?

Thank you.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 9 months ago #228530

Hi,

1. If you create a custom product field to set the "update" status, so when editing a product you set that field value to true, yes.
In the mass actions, you can add a filter on that custom field in order to export only products with that field set to "true", and more than that you can add another action after the export one to set back automatically the value of that field to false for all these products.

2. The mass actions don't have the possibility to delete csv files. But if you let the same naming, the current file will be overridden every time the mass action is processed.

The following user(s) said Thank You: PeterChain

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

Time to create page: 0.070 seconds
Powered by Kunena Forum