As stated in the question, which event is fired when someone goes into the admin panel and selects reindex data for Catalog Search Index?
I tried running grep on my command shell and I cannot seem to get that to work (to get a list of events). I've tried looking at event lists and can't find the correct one.
I would tend to think that the event catalogindex_plain_reindex_after would be fired, but I have tried this and that is not the case...
Any help would be greatly appreciated!
If you cannot find any particular event dispatch you can always get the following event on controller:
<controller_action_postdispatch_adminhtml_index_process_massReindex>...</controller_action_postdispatch_adminhtml_index_process_massReindex>
and in the observer you can get the controller params as:
$observer->getEvent()->getData('controller_action')->getRequest()->getParam('some_id_or_variable');
where 'some_id_or_variable' is the value you want to get from request params.
Related
I am having difficulty getting the events for a specific object. Basically I would like to have an event collection that reprents the "Access Stats" when looking at a file's properties on box.com. The only way I can figure to do it now is to run through all events in the stream and manually build the collection. Is there not an endpoint I can use or a query filter I can put on the events endpoint to accomplish this?
Thanks
Shawn
This is something our fields parameter would help with, but it's not yet GET /events. Keep an eye on this portion of our documentation for when support for this is available. http://developers.box.com/docs/#fields
I was wondering if the following can be done in codeigniter.
Let's assume I have a file, called Post.php, used to manage posts in an admin interface.
It has several methods, such as index (lists all posts), add, update, delete...
Now, I access the add method, so that the url becomes
/posts/add
And I add some data. I click "save" to add the new post. It calls the same method with an if statement like "if "this->input->post('addnew')"" is passed, call the model, add it to the database
Here follows the problem:
If everything worked fine, it goes to the index with the list of all posts, and displays a confirmation
BUT
No the url would still be posts/add, since I called the function like $this->index() after verifying data was added. I cannot redirect it to "posts/" since in that case no confirmation message would be shown!
So my question is: can i call a method from anther one in the same class, and have the url set to that method (/posts/index instead of /posts/add)?
It's kinda confusing, but i hope i gave you enough info to spot the problem
Cheers!
Use the redirect() in conjunction with CodeIgniter's Flash Data, or opt for AJAX.
i try to use ajax-solr and my autocomplete and result work.
But i have problem on first load.
I would like to delete the first request on all index.
Because i would like to see only my searchbar on my page.
I didn't find where is problem.
Thank you
If you followed the ajax-solr Reuters tutorial, then you probably have a Manager.doRequest() call after you initialize the widgets, etc. Just remove that line to not send the first request.
I'll start off by mentioning I'm a dojo noob. That said,
I'm having trouble reading data from a itemfilereadstore. When my page is loaded, I perform a .fetch() on a itemfilereadstore. The ajax call retrieves some data from the server and my onComplete handler is executed. My problem is after this store is populated (and after my onComplete handler is executed), I don't see a way to read its contents (enumerate its items) again without hitting the server.
How can I fetch() against this existing datastore without it trying to hit my webserver again? Surely I can look up information that already exists in this object somehow? The dojo documentation doesn't seem to have any obvious answers, what am I missing?
I believe what you're looking for is itemfilereadstore.query. If all you need is to get all the elements, just a plain old query should do the trick. If you need to filter, then you'll have to read up on the query syntax : http://dojotoolkit.org/reference-guide/dojo/data/ItemFileReadStore.html#query-syntax
How can I know if an action is front end or backend from within the code of an observer for the controller_action_layout_render_before event ?
This returns true if currently in backend.
Mage::app()->getStore()->isAdmin()
Do a print of the object observer to log file to see if you can find any data which acts as a clue to what you need:
Mage::log("observer object:" . print_r($observer, true));
I think there may be a data field which contains the event which fired the observer from there. Please post back your findings!
Hope this helps.