Difference between revisions of "Page Templates:Functions"
From Whirlwind eCommerce Wiki
Line 25: | Line 25: | ||
*[[functions:recentlyViewedGet|recentlyViewedGet]] - returns data for recently viewed pages | *[[functions:recentlyViewedGet|recentlyViewedGet]] - returns data for recently viewed pages | ||
*[[functions:pageCustomSearchGroup|pageCustomSearchGroup]] - returns Custom Search Group data used to build a custom search widget | *[[functions:pageCustomSearchGroup|pageCustomSearchGroup]] - returns Custom Search Group data used to build a custom search widget | ||
+ | |||
+ | ;Manage Copy | ||
+ | *[[functions:fullyQualifyAllURLs:fullyQualifyAllURLs]] - converts any relative/absolute URL in the passed copy to fully qualified URLs - useful when sending copy as an email | ||
;Retrieve Order information for perpetual and full shopping carts, checkout stages, order history | ;Retrieve Order information for perpetual and full shopping carts, checkout stages, order history | ||
Line 39: | Line 42: | ||
*[[functions:userWishListGet|userWishListGet]] - retrieves product data for products in a specific user's wish list | *[[functions:userWishListGet|userWishListGet]] - retrieves product data for products in a specific user's wish list | ||
*[[functions:usersAmbassadorGet|usersAmbassadorGet]] - retrieves user data for users that are classified as 'ambassadors' | *[[functions:usersAmbassadorGet|usersAmbassadorGet]] - retrieves user data for users that are classified as 'ambassadors' | ||
− | |||
;Set Tracking Functions | ;Set Tracking Functions | ||
Line 50: | Line 52: | ||
*[[functions:userBlogEntryAddEdit|userBlogEntryAddEdit]] - managers user blog entries | *[[functions:userBlogEntryAddEdit|userBlogEntryAddEdit]] - managers user blog entries | ||
*[[functions:userBlogSetup|userBlogSetup]] - sets up a user with a blog | *[[functions:userBlogSetup|userBlogSetup]] - sets up a user with a blog | ||
− | *[[functions:authorizeIsLoggedOut | + | *[[functions:authorizeIsLoggedOut|authorizeIsLoggedOut]] - to check if a user is logged out |
− | *[[functions:authorizeIsLoggedIn | + | *[[functions:authorizeIsLoggedIn|authorizeIsLoggedIn]] - to check if a user is logged in |
;Retrieve additional information from address data | ;Retrieve additional information from address data |
Revision as of 13:28, 3 December 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 Options Tags for common select boxes
- addressStateOptions - returns string of option tags for states
- addressCountryOptions - returns string of option tags for countries
- orderExpDateOptions - returns string of option tags for expiration dates of a credit card
- orderPayTypeOptions - returns string of option tags for pay types
- Set Variables that Content Managers can use in the WYSIWYG copy editor
- pageContentAttribSet - sets a single variable that can be used by content managers in the page manager form (including the WYSIWYG editor)
- pageContentAttribStart/pageContentAttribEnd - wrapper that the contents of which is set as a single variable that can be used by content managers in the page manager form
- Retrieve Page Content to Build Pages
- pageMenuGet - returns menu item data
- pageChildrenGet - returns page data for children of a specific page
- pageSearchGet - returns page data for pages qualifying for a keyword search
- pageZoneGet - returns code to display an banner ad zone
- pageForumPostsGet - returns forum post data for posts submitted to a particular forum page
- pagePollQuestionsGet - returns question and answer data for building a poll
- pagePollResultsGet - returns poll submission data for building a report of poll results
- pageBreadcrumbsFamilyGet( - returns breadcrumb data by traversing parent pages
- pageBreadcrumbsHistoryGet - returns breadcrumb data by traversing linear browsing history
- pageProductsGet - returns product data for products related to a specific page
- recentlyViewedGet - returns data for recently viewed pages
- pageCustomSearchGroup - returns Custom Search Group data used to build a custom search widget
- Manage Copy
- functions:fullyQualifyAllURLs:fullyQualifyAllURLs - converts any relative/absolute URL in the passed copy to fully qualified URLs - useful when sending copy as an email
- Retrieve Order information for perpetual and full shopping carts, checkout stages, order history
- orderGetSummary - returns summerized order information. Useful for perpetual carts.
- orderGetPayTypes - returns data relating to active paytypes in the system
- userGetAddresses - returns data for all addresses belonging to a specific user
- orderGetShipArray - returns array of shipping options and costs
- orderGetCompleteArray - returns full order information including payment, item, address, etc. Use for shopping carts, order summaries and receipts of orders.
- Retrieve User Content to Build Community (Web 2.0) Pages
- usersGet - retrieve user data from a list of user ids
- userBlogEntriesGet - retrieve blog entry data belonging to a specific user
- userFriendsGet - retrieves data for users in a specific user's 'friend list'
- userWishListGet - retrieves product data for products in a specific user's wish list
- usersAmbassadorGet - retrieves user data for users that are classified as 'ambassadors'
- Set Tracking Functions
- recentlyViewedAdd - registers a page to the recently viewed history when viewed
- User Management Functions
- userAccountEdit - manages user account information
- userAccountAndAddressCreate - create a user account (or both a user account and address)
- userAddressAddEdit - manages user addresses
- userBlogEntryAddEdit - managers user blog entries
- userBlogSetup - sets up a user with a blog
- authorizeIsLoggedOut - to check if a user is logged out
- authorizeIsLoggedIn - to check if a user is logged in
- Retrieve additional information from address data
- addressCountryNameGet - returns full country name from ISO 2 digit format
- addressZipDetailsGet - returns data about zip including: city,state,areaCode,county,timeZone,latitude,longitude,dayLightSavings
- Shortcut Functions that just plain make your job easier
- redirect - redirects visitors to another page
- valueArrayFromQuery - returns a single dimension array of values based on the contents of a specific column in all records of a query
- dollarFormat - converts a decimal to a dollar value with preceding $ sign.
- Functions used by internal actions, you probably will not use
- ipBlockCheck - checks if an IP is registered to the block list
- prodOptionString2Array - converts a string of product option data to an array
- pageContentAttribsSet - sets multiple variables that can be used by content managers in the page manager form (including the WYSIWYG editor)
- orderShipFedexRate - extracts fedex rates from shipping tables
- orderShipAdjustRate - adjusts fedex ship rate array prices