Version 7 (modified by Ashwyn, 10 years ago) ( diff )


Save Search & Subscription


The save search and subscription functionality can be used to enable to save the searches he makes and would like to revisit in future or subscribe to them to get updates on a daily/weekly/monthly basis. The tutorial link -

Data Model

Save Search

Holds information about the search query and the parameters that are saved by the user. The data model can be found in modules/eden/

Field NamePurposeDatatype/table
user_id The user id of the user who saved the search. FK referenced from (integer)
subscribedThe subscribed status of the user to a particular saved search.boolean
search_varsThe search parameters for the search saved by the userstring (Assumption for the time being)
person_idThe person_id of the user who saves the searchFK referenced from pr_person
s3.meta_fields() metadata


Holds information about the subscription details. The data model can be found in models/

Field NamePurposeDatatype/table
user_idThe user_id of the user who selects the subscription mode FK referenced from (integer)
subscribe_modeDescribes the mode(s) of subscription selected
subscription_frequencyThe frequency at which the subscription are to be sent.
person_idThe person_id of the user who saves the searchFK referenced from pr_person
metafields s3.meta_fields()

UI Design

  • Save Search Widget - The widget for saving the search will appear on the search results page, basically it will be a button which asks the user whether the particular search must be saved.
  • Review of Saved Searches - A tab named "Saved Searches" is present in pr/person for this purpose. The user will have the option of modifying, deleting, loading and subscribing/unsubscribing the saved searches.
  • Widget for Subscribing - The widget for subscription will appear on the page which contains all the saved searches, basically it will be a button which asks the user the particular saved search must be subscribed/unsubscribed.
  • Load Search - A load search button to open the saved search will be present alongside the delete and subscribe/unsubscribe button so that the user is enabled to look at the current results of the saved search by opening the search page.
  • Subscription Details - A tab named "Subscription Details" is present in pr/person for this purpose. The user is provided with an option to modify/create his subscription information.

Files modified

Following are the files which were modified -

  • modules/s3/ - For the purpose of putting in the save search widget and saving the search parameter when the user wants to save/load a search. Several big and small modification were done to put these features.
  • models/ - Contains the Save Search Data model.
  • models/ - Contains the Subscription Data model.
  • controllers/ - Modifications were done in person() to put the Saved Searches and Subscription Details tabs. Also, to provide the functionality of loading filter.
  • controller/ - It contains functions to review the subscription details and other functions to send emails containing updates to the subscribed users.
  • cron/crontab - To schedule the daily/weekly/monthly checks for updated results in saved search and subsequently sending of emails for them.
  • Deployment Settings to enable or disable save search and subscription is also there in place.

Improvements for future

  • Sending Email in XSLT format.
  • Adding the SMS/Twitter modes of subscription.
Note: See TracWiki for help on using the wiki.