Difference between revisions of "Page Templates:Functions"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(New page: A series of custom functions are created to allow content management to easily access content they require to build the copy in templates: *eV::addressStateOptions($value=NULL); returns s...)
 
Line 1: Line 1:
 
A series of custom functions are created to allow content management to easily access content they require to build the copy in templates:
 
A series of custom functions are created to allow content management to easily access content they require to build the copy in templates:
  
 +
;Quick Output of State/Country Options in a Form Select
 
*eV::addressStateOptions($value=NULL); returns string of option tags for states
 
*eV::addressStateOptions($value=NULL); returns string of option tags for states
 
*eV::addressCountryOptions($value=NULL); returns string of option tags for countries
 
*eV::addressCountryOptions($value=NULL); returns string of option tags for countries
 +
 +
;Set Variables that Content Managers can use in the WYSIWYG copy editor
 
*eV::pageContentAttribsSet($array)
 
*eV::pageContentAttribsSet($array)
 
*eV::pageContentAttribSet($replaceString,$resultString);
 
*eV::pageContentAttribSet($replaceString,$resultString);
 
*eV::pageContentAttribSetStart($replaceString) / eV::pageContentAttribSetEnd()
 
*eV::pageContentAttribSetStart($replaceString) / eV::pageContentAttribSetEnd()
 +
 +
;Retrieve Page Content to Build Pages
 
*eV::pageMenuGet($menuId=NULL) returns $arrMenu (array)
 
*eV::pageMenuGet($menuId=NULL) returns $arrMenu (array)
*eV::pagesGet($pageIdOrKeywordsOrPageIdArray,$fieldList=NULL,$orderBy=NULL,$orderDir="DESC",$orderType="str",$showNoSearch=true)
 
 
*eV::pageChildrenGet($pageId,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrChildren (array)
 
*eV::pageChildrenGet($pageId,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrChildren (array)
 
*eV::pageSearchGet($keywords,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrSearch (array)
 
*eV::pageSearchGet($keywords,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrSearch (array)
Line 17: Line 21:
 
*eV::pageBreadcrumbsHistoryGet($pageId,$breadcrumb)
 
*eV::pageBreadcrumbsHistoryGet($pageId,$breadcrumb)
 
*eV::pageProductsGet($pageId,$fieldList)
 
*eV::pageProductsGet($pageId,$fieldList)
*eV::recentlyViewedAdd($pageId) // appends recently viewed array
+
*eV::prodOptionString2Array($optionValue)
 
*eV::recentlyViewedGet($fieldList) //returns array of page data for recently viewed items
 
*eV::recentlyViewedGet($fieldList) //returns array of page data for recently viewed items
 
*eV::pageCustomSearchGroup($groupIdOrName) // returns array[groupName,groupId,groupNotes,selectField,options[optionsId,optionName,link]]
 
*eV::pageCustomSearchGroup($groupIdOrName) // returns array[groupName,groupId,groupNotes,selectField,options[optionsId,optionName,link]]
*eV::prodOptionString2Array($optionValue)
+
 
*eV::orderGetPayTypes() // returns array of ACTIVE pay types, dim 2: payType, payTypeName
+
;Retrieve User Content to Build Community (Web 2.0) Pages
 
*eV::usersGet($fieldList,$userIdList,$orderBy=NULL,$orderDir="DESC",$orderType="str")
 
*eV::usersGet($fieldList,$userIdList,$orderBy=NULL,$orderDir="DESC",$orderType="str")
 +
*eV::userBlogEntriesGet($fieldList,$orderBy=NULL,$userId=NULL)
 +
*eV::userFriendsGet($fieldList,$userId=NULL) // userId defaults to session.user.userId. returnes 2 dim array [index][fieldName] for users that are on $userId's friend list
 +
*eV::userWishListGet($fieldList,$userId=NULL); // userid defaults to session.user.userid. returns 2 min array[index][fieldName] for pages that are on $userIds wish list
 +
*eV::usersAmbassadorGet($fieldList);
 +
 +
;Retrieve Order Content to Build Cart and Checkout Pages
 +
*eV::orderGetPayTypes() // returns array of ACTIVE pay types, dim 2: payType, payTypeName
 
*eV::userGetAddresses($fieldList,$userId=NULL) // userId defaults to session.user.userId if empty. returns multidimarray, first dim = address index, 2nd dim is keys for each field. can pass fieldList to limit fields returned
 
*eV::userGetAddresses($fieldList,$userId=NULL) // userId defaults to session.user.userId if empty. returns multidimarray, first dim = address index, 2nd dim is keys for each field. can pass fieldList to limit fields returned
*eV::userAccountAndAddressCreate($fieldList,$exitLocation=NULL) exitLocation reloads same page if empty. Also exitLocation can be passed as a post variable. returns array [values]array [customFieldTags]array [message]string
+
 
 +
;Set Tracking Functions
 +
*eV::recentlyViewedAdd($pageId) // appends recently viewed array
 +
 
 +
;User Management Functions
 
*eV::userAccountEdit($fieldList,$exitLocation=NULL,$userId=NULL) exitLocation reloads same page if empty. Also exitLocation can be passed as a post variable. userId defaults to session.user.userId. returns array [values]array [customFieldTags]array [message]string
 
*eV::userAccountEdit($fieldList,$exitLocation=NULL,$userId=NULL) exitLocation reloads same page if empty. Also exitLocation can be passed as a post variable. userId defaults to session.user.userId. returns array [values]array [customFieldTags]array [message]string
 
*eV::userAddressAddEdit($fieldList) returns array [values]array [message]string
 
*eV::userAddressAddEdit($fieldList) returns array [values]array [message]string
*eV::userBlogEntriesGet($fieldList,$orderBy=NULL,$userId=NULL)
 
 
*eV::userBlogEntryAddEdit($fieldList,$userId=NULL)
 
*eV::userBlogEntryAddEdit($fieldList,$userId=NULL)
 
*eV::userBlogSetup($pageId=NULL,$userId=NULL) // page id defaults to first page belonging to user that is blog main page // userId defaults to session userId // adds blog page if none, returns blog pageId either way
 
*eV::userBlogSetup($pageId=NULL,$userId=NULL) // page id defaults to first page belonging to user that is blog main page // userId defaults to session userId // adds blog page if none, returns blog pageId either way
*eV::userFriendsGet($fieldList,$userId=NULL) // userId defaults to session.user.userId. returnes 2 dim array [index][fieldName] for users that are on $userId's friend list
+
 
*eV::userWishListGet($fieldList,$userId=NULL); // userid defaults to session.user.userid. returns 2 min array[index][fieldName] for pages that are on $userIds wish list
+
;Shortcut Functions that just plain make your job easier
*eV::usersAmbassadorGet($fieldList);
+
 
*eV::redirect($location)
 
*eV::redirect($location)
 
*eV::valueArrayFromQuery($query,$fieldName)
 
*eV::valueArrayFromQuery($query,$fieldName)
 +
 +
;Functions used by internal actions, you probably will not use
 
*eV::ipBlockCheck($ipAddress,$forwardOnBlock=NULL) // returns T/F if address is blocked. if forwardOnBlock is passed, then it forwards to URL
 
*eV::ipBlockCheck($ipAddress,$forwardOnBlock=NULL) // returns T/F if address is blocked. if forwardOnBlock is passed, then it forwards to URL
*eV::pageForumPostsGet($userId=NULL,$pageId=NULL,$fieldList=NULL,$orderBy=NULL)
 
*eV::userBlogsGet($userId,$fieldList,$orderBy=NULL);
 
*eV:userFriendsGet($userId,$fieldList,$orderBy=NULL);
 
*eV:userWishListGet($userId,$fieldList,$orderBy=NULL);
 

Revision as of 05:52, 1 October 2008

A series of custom functions are created to allow content management to easily access content they require to build the copy in templates:

Quick Output of State/Country Options in a Form Select
  • eV::addressStateOptions($value=NULL); returns string of option tags for states
  • eV::addressCountryOptions($value=NULL); returns string of option tags for countries
Set Variables that Content Managers can use in the WYSIWYG copy editor
  • eV::pageContentAttribsSet($array)
  • eV::pageContentAttribSet($replaceString,$resultString);
  • eV::pageContentAttribSetStart($replaceString) / eV::pageContentAttribSetEnd()
Retrieve Page Content to Build Pages
  • eV::pageMenuGet($menuId=NULL) returns $arrMenu (array)
  • eV::pageChildrenGet($pageId,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrChildren (array)
  • eV::pageSearchGet($keywords,$fieldList=NULL,$orderBy=NULL,$orderDir=(DESC,ASC),$orderType(str,num)) returns $arrSearch (array)
  • eV::pageZoneGet($zoneId,$pageId,$dBug=0) returns bannerOutput (string)
  • eV::pageForumPostsGet($userId=NULL,$pageId=NULL,$templateIdList=NULL,$fieldList=NULL,$orderBy=NULL) returns array (forumPostLink,ratingCount,ratingCount[1-5],ratingTotal,ratingAverage,posts[])
  • eV::pagePollQuestionsGet($pageId)
  • eV::pagePollResultsGet($pageId)
  • eV::pageBreadcrumbsFamilyGet($pageId)
  • eV::pageBreadcrumbsHistoryGet($pageId,$breadcrumb)
  • eV::pageProductsGet($pageId,$fieldList)
  • eV::prodOptionString2Array($optionValue)
  • eV::recentlyViewedGet($fieldList) //returns array of page data for recently viewed items
  • eV::pageCustomSearchGroup($groupIdOrName) // returns array[groupName,groupId,groupNotes,selectField,options[optionsId,optionName,link]]
Retrieve User Content to Build Community (Web 2.0) Pages
  • eV::usersGet($fieldList,$userIdList,$orderBy=NULL,$orderDir="DESC",$orderType="str")
  • eV::userBlogEntriesGet($fieldList,$orderBy=NULL,$userId=NULL)
  • eV::userFriendsGet($fieldList,$userId=NULL) // userId defaults to session.user.userId. returnes 2 dim array [index][fieldName] for users that are on $userId's friend list
  • eV::userWishListGet($fieldList,$userId=NULL); // userid defaults to session.user.userid. returns 2 min array[index][fieldName] for pages that are on $userIds wish list
  • eV::usersAmbassadorGet($fieldList);
Retrieve Order Content to Build Cart and Checkout Pages
  • eV::orderGetPayTypes() // returns array of ACTIVE pay types, dim 2: payType, payTypeName
  • eV::userGetAddresses($fieldList,$userId=NULL) // userId defaults to session.user.userId if empty. returns multidimarray, first dim = address index, 2nd dim is keys for each field. can pass fieldList to limit fields returned
Set Tracking Functions
  • eV::recentlyViewedAdd($pageId) // appends recently viewed array
User Management Functions
  • eV::userAccountEdit($fieldList,$exitLocation=NULL,$userId=NULL) exitLocation reloads same page if empty. Also exitLocation can be passed as a post variable. userId defaults to session.user.userId. returns array [values]array [customFieldTags]array [message]string
  • eV::userAddressAddEdit($fieldList) returns array [values]array [message]string
  • eV::userBlogEntryAddEdit($fieldList,$userId=NULL)
  • eV::userBlogSetup($pageId=NULL,$userId=NULL) // page id defaults to first page belonging to user that is blog main page // userId defaults to session userId // adds blog page if none, returns blog pageId either way
Shortcut Functions that just plain make your job easier
  • eV::redirect($location)
  • eV::valueArrayFromQuery($query,$fieldName)
Functions used by internal actions, you probably will not use
  • eV::ipBlockCheck($ipAddress,$forwardOnBlock=NULL) // returns T/F if address is blocked. if forwardOnBlock is passed, then it forwards to URL