sugar portal for zend framework (sp-zf) configuration - SugarForge

excitingwonderlakeInternet και Εφαρμογές Web

13 Δεκ 2013 (πριν από 3 χρόνια και 4 μήνες)

82 εμφανίσεις



Rua Bela Cintra, 1415 - cj. 51
São Paulo, SP 01415-000
+55 11 3237-3110
www.lampadaglobal.com

SUGAR PORTAL FOR ZEND FRAMEWORK
(SP-ZF) CONFIGURATION

1) Installation
a. Module Loader – For systems which do not have customizations in the
Contacts modules, use the Module Loader to installer the zip package.
b. Manual Installation – If using the Module Loader is NOT possible, do the
following:
i. Unzip the files and copy the following files and folder to the root folder
of your SugarCRM system:
iportal/*
iportal.php
download_portal.php
ii. Create three custom fields in the Contacts module:
portal_username_c (Text Field)
portal_password_c (Text Field)
portal_active_c (Checkbox)
iii. Merge the following files from folder
\SugarModules\modules\Contacts in the zip package with these files in
your system:
custom/modules/Contacts/metadata/editviewdefs.php
custom/modules/Contacts/views/view.edit.php
custom/modules/Contacts/logic_hooks.php
modules/Contacts/Contactslogic_hooks.php
2) Creating a User
Create a new User in Sugar. This User will be the default user to access the Sugar
objects from the Portal.
3) Edit the following items in iportal/config.php
a. Database connection details
b. default_user / user_name ( the username of the User created on step 2 )
c. default_user / id ( the id of the User created on step 2 )
d. system_path ( the complete location of your Sugar in the system files )
e. project_url ( the location of your Sugar on web )
f. developer => true / false ( show errors or not )

NOTE: If you encounter problems with your database connection or your user
cannot authenticate in the Portal, verify that pdo_mysql extension is enabled in
php.ini.
4) To add a new Controller (Sugar module) to the portal, do the following:
LAMPADA GLOBAL SERVICES AGREEMENT- Page 2 of 2
a. Add it to the menu:
iportal/application/metadata/Menu/menu.php
b. Add a new Controller
iportal/application/controllers/<module_name>Controller.php
c. For each action in the controller, edit as necessary the methods in the controller
file (indexAction, detailAction, editAction, etc).
d. Create the views for each action:
iportal/application/views/scripts/<module_name_lower>/<action_name>.phtml
.
NOTE: The assign and logic is in the actions in the Controller.
e. For Edit actions you can build your form in:
iportal/application/forms/<module_name> Edit.php
NOTE: This makes it possible to use the Zend Framework form validations.
f. For List actions you can create metadata ( similar to the Sugar ) in
iportal/application/metadata/<module_name>/listviewdefs.php

NOTE: By default the portal gets the list of records related to the Account
related to Contact ( user logged in Portal ), to change that logic you can modify
listAction in your module controller or in BeanController.php (to change the
behavior for all controllers).

GOOD LUCK !