Page Templates:Functions
From Whirlwind eCommerce Wiki
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