0

How to reset the admin panel settings of a module installed in a demo magento project everyday or in any time frame.

I want to create a demo project for the module that I have developed, so that any User can login to admin panel and have access to My module functionality and settings. So when they logout, the settings in Admin panel will get changed compared to default values that I have set. It will create confusion to all the other Users who will Login after the initial user.

So I want to reset all my module settings in admin panel to default value every specific time interval for example: every 5 minutes, the values need to reset.

3
  • can please let me know what code u have try ?
    – Keyul Shah
    Apr 24, 2015 at 12:26
  • I just want the idea, how I can do that? Will it be possible using simple php script executed with cron job ? Apr 24, 2015 at 12:29
  • yes you can do using magento cron jobs. but you must have original values of the of system configuration
    – Keyul Shah
    Apr 24, 2015 at 12:31

2 Answers 2

1

I have applied a simple idea and its working fine. I have created a backup of my database. Then everyday after 24 hours I am applying that backup to the demo database using Cron. So, whenever a user changes the demo module settings in admin panel; after 24 hours those changes will get replaced with default module settings.

0

You can observe the event controller_action_predispatch_adminhtml_index_logout.
it is dispatched every time you click logout in the admin panel.
And reset your values in the observer. I can't give you code because I don' know what you are trying to change.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.