Installation
Introduction
In this document, we will outline the procedures for installing the plugin, building it, and deploying it to a production environment.
Clone the plugin from the repository:
git clone https://gitlab.com/oktamam/otas-wp-plugin.git
Navigate to the plugin directory:
cd otas-wp-plugin/frontend
Install dependencies:
npm install
Start development server:
npm run dev
Compile assets for production:
npm run build
Installation
- Install WordPress locally.
- Clone this repo inside
wordpress/wp-content/plugins/
directory. - Add wordpress base url to otas backbone cors settings (
/backbone/system/settings/update/offline/cors/cors
). - From OTAS admin panel and add new (OTAS PLUGIN) API key from
dashboard/api-clients
, and put it in WordPress OTAS plugin settings page (/wp-admin/admin.php?page=otas_settings
). - Create new WordPress page and add OTAS shortcode
[otas]
and[otas lang="ar"]
for Arabic version - for old version of programs list. to use the new follow the new site deployment
Preparation
Open WordPress and install the OTAS plugin. Then, navigate to settings to configure the required values as defined in the Plugin Configuration section.
New Site Deployment
- In Programs list Shortcode:
<div id="otas-app"> [site:programs-cards multi='true' university-id=UNIVERSITY_IDÂ redirect-path='APPLY_FORM']</div>
Redirect Path: The page url for the Apply Form. Ex:apply-form
University ID: The id of the university in case the programs of university
- In Apply Form Shortcode:
<div id="otas-app"> <p> [site:apply-form fallback-path="PROGRAMS_LIST" multi='true' redirect-path="DONE_PAGE"] </p></div>
Redirect Path: The page url for the Done Page. Ex:done-page
Fallback Path: The page url for the programs List. Ex:programs-cards
- Add Done page with
<div id="otas-app">[site:done multi='true' redirect-path='PROGRAMS_LIST']</div>
Redirect Path: The page url for the programs List. Ex:programs-cards
Affiliate Pages
- Affiliate Login: To add affiliate login form for users use the following affiliate-login shortcode.
[affiliate-login apply-page='program-list']
- Affiliate Registration: To add affiliate register form, use the following shortcode.
[affiliate-registration lang='en']