Difference between revisions of "Page Templates:Functions"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(changed linked pages, rebuilt descriptions)
(changed addressesSetSelect to addressesShipSelect)
 
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Page Template Functions Shortcuts}}
 
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
+
;Quick Output of Options Tags for common select boxes
 
*[[functions:addressStateOptions|addressStateOptions]] - returns string of option tags for states
 
*[[functions:addressStateOptions|addressStateOptions]] - returns string of option tags for states
 
*[[functions:addressCountryOptions|addressCountryOptions]] - returns string of option tags for countries
 
*[[functions:addressCountryOptions|addressCountryOptions]] - returns string of option tags for countries
 +
*[[functions:orderExpDateOptions|orderExpDateOptions]] - returns string of option tags for expiration dates of a credit card
 +
*[[functions:orderPayTypeOptions|orderPayTypeOptions]] - returns string of option tags for pay types
  
 
;Set Variables that Content Managers can use in the WYSIWYG copy editor
 
;Set Variables that Content Managers can use in the WYSIWYG copy editor
*[[functions:pageContentAttribsSet|pageContentAttribsSet]] - sets multiple variables that can be used by content managers in the page manager form (including the WYSIWYG editor)
 
 
*[[functions:pageContentAttribSet|pageContentAttribSet]] - sets a single variable that can be used by content managers in the page manager form (including the WYSIWYG editor)
 
*[[functions:pageContentAttribSet|pageContentAttribSet]] - sets a single variable that can be used by content managers in the page manager form (including the WYSIWYG editor)
*[[functions:pageContentAttribSetStart/pageContentAttribSetEnd|pageContentAttribSetStart/pageContentAttribSetEnd]] - wrapper that the contents of which is set as a single variable that can be used by content managers in the page manager form
+
*[[functions:pageContentAttribStart/pageContentAttribEnd|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
 
;Retrieve Page Content to Build Pages
Line 16: Line 18:
 
*[[functions:pageZoneGet|pageZoneGet]] - returns code to display an banner ad zone
 
*[[functions:pageZoneGet|pageZoneGet]] - returns code to display an banner ad zone
 
*[[functions:pageForumPostsGet|pageForumPostsGet]] - returns forum post data for posts submitted to a particular forum page
 
*[[functions:pageForumPostsGet|pageForumPostsGet]] - returns forum post data for posts submitted to a particular forum page
 +
*[[functions:pageGet|pageGet]] - return specific information about a specific page
 
*[[functions:pagePollQuestionsGet|pagePollQuestionsGet]] - returns question and answer data for building a poll
 
*[[functions:pagePollQuestionsGet|pagePollQuestionsGet]] - returns question and answer data for building a poll
 
*[[functions:pagePollResultsGet|pagePollResultsGet]] - returns poll submission data for building a report of poll results
 
*[[functions:pagePollResultsGet|pagePollResultsGet]] - returns poll submission data for building a report of poll results
Line 21: Line 24:
 
*[[functions:pageBreadcrumbsHistoryGet|pageBreadcrumbsHistoryGet]] - returns breadcrumb data by traversing linear browsing history
 
*[[functions:pageBreadcrumbsHistoryGet|pageBreadcrumbsHistoryGet]] - returns breadcrumb data by traversing linear browsing history
 
*[[functions:pageProductsGet|pageProductsGet]] - returns product data for products related to a specific page
 
*[[functions:pageProductsGet|pageProductsGet]] - returns product data for products related to a specific page
 +
*[[functions:catalogProductsGet|catalogProductsGet]] - returns product data by catalog number
 
*[[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:continueShoppingGet|continueShoppingGet]] - returns data for recently viewed pages
 +
*[[functions:pageCustomSearchGroup|pageCustomSearchGroup]] - returns Custom Search Group data used to build a custom search widget
 +
*[[functions:prodArrayToJS|prodArrayToJS]] - creates a string of pricing data that can be assigned to a javascript object to calculate pricing on the fly (ajax)
 +
 
 +
;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
 +
 
 +
;Manage Large Lists of Data
 +
*[[functions:pagination|pagination]] - easy to use tool to paginate large sets of data. Use for managing page children, search results and more
 +
 
 +
;Retrieve Order information for perpetual and full shopping carts, checkout stages, order history
 +
*[[functions:orderGetSummary|orderGetSummary]] - returns summerized order information. Useful for perpetual carts.
 +
*[[functions:orderGetPayTypes|orderGetPayTypes]] - returns data relating to active paytypes in the system
 +
*[[functions:userGetAddresses|userGetAddresses]] - returns data for all addresses belonging to a specific user
 +
*[[functions:orderGetShipArray|orderGetShipArray]] - returns array of shipping options and costs
 +
*[[functions:orderGetCompleteArray|orderGetCompleteArray]] - returns  full order information including payment, item, address, etc. Use for shopping carts, order summaries and receipts of orders.
 +
*[[functions:ordersGetList|ordersGetList]] - returns listing of orders for a particular user (useful for building order history pages)
 +
*[[functions:addressesShipSelect|addressesShipSelect]] - returns a complete <SELECT> tag that can be used for multiple address checkouts
 +
*[[functions:addressesGet|addressesGet]] - returns array of user/order addresses for use with generating a custom multiple address checkout process
 +
 
 +
;Integrate With 3rd Party Web Tools
 +
*[[functions:googleTrack|googleTrack]] - Google Analytics Integration
 +
*[[functions:googleTrackTrans|googleTrackTrans]] - Google eCommerce Conversion Tracking
 +
*[[functions:TEMConversionTag|TEMConversionTag]] - Trigger Email Marketing Conversion Tracking
 +
*[[functions:jellyfishOutput|jellyfishOutput]] - Jellyfish Order Conversion Tracking
  
 
;Retrieve User Content to Build Community (Web 2.0) Pages
 
;Retrieve User Content to Build Community (Web 2.0) Pages
Line 30: Line 58:
 
*[[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'
 
;Retrieve Order Content to Build Cart and Checkout Pages
 
*[[functions:orderGetPayTypes|orderGetPayTypes]] - returns data relating to active paytypes in the system
 
*[[functions:userGetAddresses|userGetAddresses]] - returns data for all addresses belonging to a specific user
 
  
 
;Set Tracking Functions
 
;Set Tracking Functions
Line 40: Line 64:
 
;User Management Functions
 
;User Management Functions
 
*[[functions:userAccountEdit|userAccountEdit]] - manages user account information
 
*[[functions:userAccountEdit|userAccountEdit]] - manages user account information
 +
*[[functions:userAccountAndAddressCreate|userAccountAndAddressCreate]] - create a user account (or both a user account and address)
 
*[[functions:userAddressAddEdit|userAddressAddEdit]] - manages user addresses
 
*[[functions:userAddressAddEdit|userAddressAddEdit]] - manages user addresses
 
*[[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|authorizeIsLoggedOut]] - to check if a user is logged out
 +
*[[functions:authorizeIsLoggedIn|authorizeIsLoggedIn]] - to check if a user is logged in
 +
 +
;Retrieve additional information from address data
 +
*[[functions:addressCountryNameGet|addressCountryNameGet]] - returns full country name from ISO 2 digit format
 +
*[[functions:addressZipDetailsGet|addressZipDetailsGet]] - returns data about zip including: city,state,areaCode,county,timeZone,latitude,longitude,dayLightSavings
 +
 +
;Security functions
 +
*[[functions:captchaCheck|captchaCheck]] - validate a captcha image to ensure we don't have automated form submissions
 +
*[[functions:ipBlockCheck|ipBlockCheck]] - checks if an IP is registered to the block list
  
 
;Shortcut Functions that just plain make your job easier
 
;Shortcut Functions that just plain make your job easier
 
*[[functions:redirect|redirect]] - redirects visitors to another page
 
*[[functions:redirect|redirect]] - redirects visitors to another page
 
*[[functions:valueArrayFromQuery|valueArrayFromQuery]] - returns a single dimension array of values based on the contents of a specific column in all records of a query
 
*[[functions:valueArrayFromQuery|valueArrayFromQuery]] - returns a single dimension array of values based on the contents of a specific column in all records of a query
 
+
*[[functions:dollarFormat|dollarFormat]] - converts a decimal to a dollar value with preceding $ sign.
;Functions used by internal actions, you probably will not use
+
*[[functions:validateEmail|validateEmail]] - checks to make sure an email address is well formatted.
*[[functions:ipBlockCheck|ipBlockCheck]] - checks if an IP is registered to the block list
+
*[[functions:prodOptionString2Array|prodOptionString2Array]] - converts a string of product option data to an array
+

Latest revision as of 17:49, 25 May 2009

Page Template Managers

Page Template Functions

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
Set Variables that Content Managers can use in the WYSIWYG copy editor
Retrieve Page Content to Build Pages
Manage Copy
  • fullyQualifyAllURLs - converts any relative/absolute URL in the passed copy to fully qualified URLs - useful when sending copy as an email
Manage Large Lists of Data
  • pagination - easy to use tool to paginate large sets of data. Use for managing page children, search results and more
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.
  • ordersGetList - returns listing of orders for a particular user (useful for building order history pages)
  • addressesShipSelect - returns a complete <SELECT> tag that can be used for multiple address checkouts
  • addressesGet - returns array of user/order addresses for use with generating a custom multiple address checkout process
Integrate With 3rd Party Web Tools
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
User Management Functions
Retrieve additional information from address data
Security functions
  • captchaCheck - validate a captcha image to ensure we don't have automated form submissions
  • ipBlockCheck - checks if an IP is registered to the block list
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.
  • validateEmail - checks to make sure an email address is well formatted.