exporting to XML?

  • Posts: 10
  • Thank you received: 0
10 years 3 weeks ago #177867

-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.2.3
-- PHP version -- : 5.3.3
-- Browser(s) name and version -- : safari 7.1

For my website I want to show my customers, which are shops, on a google map. I have a module in Joomla which works perfectly and now I want to export the information into a KML file (this is a XML file used by google maps, google earth and garmin). I checked the geolocation table but this table is not meeting the requirements I need, so I already added custom field at the address object lat and long.

I see in the mass actions only an export to csv and I can not add an other file type to it, pity. So I was now looking into the trigger onhikashopCronTrigger. The explanation of this trigger is very summier and what does the $resultsTrigger mean. Is this trigger fired when the cron is checking what must be started or is this only started when other tasks are scheduled on your system?

Shortly, how can I create in an easy way the KML file.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 weeks ago #177872

Hi,

The onHikashopCronTrigger trigger is a generic trigger which calls all the hikashop plugins each time the cron is fired so that the plugins can do what they want.
That means that if you implement this plugin, you'll have to handle everything in that function of your plugin :
the loading of the data you want in your KML file from the database with MySQL queries
the creation of the data to put in the KML file
the writing of the file on the hard drive of the web server

Then, each time the cron is fired, the plugin will regenerate the file.

Most of the plugins using this trigger have a mechanism in order to not process its stuff at each cron, but only when they need.
For example, if you look at the plugins/hikashop/rates plugin, which is used to update the currencies rates automatically, there is some code to handle that and an option to set the frequency of the processing. That way, even if the cron is triggered every two minutes, the retrieval of the rates is done only once a day.

The following user(s) said Thank You: peter.feyen

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

  • Posts: 10
  • Thank you received: 0
10 years 2 weeks ago #178382

Nicolas,

Thanks for your response. I took the rate plugin as guide to create my own cron plugin. This plugin shows me the essentials for controlling the plugin.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum