Difference between revisions of "Page Templates:Functions"

From Whirlwind eCommerce Wiki
Jump to: navigation, search
(spelling correction)
(added prodArrayToJS)
Line 27: Line 27:
 
*[[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
 +
*[[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
 
;Manage Copy
Line 69: Line 70:
 
*[[functions:dollarFormat|dollarFormat]] - converts a decimal to a dollar value with preceding $ sign.
 
*[[functions:dollarFormat|dollarFormat]] - converts a decimal to a dollar value with preceding $ sign.
 
*[[functions:validateEmail|validateEmail]] - checks to make sure an email address is well formatted.
 
*[[functions:validateEmail|validateEmail]] - checks to make sure an email address is well formatted.
*[[functions:phpObjToJS|phpObjToJS]] - converts a PHP object (containing any combination of integers, numbers, strings, objects and arrays) into an outputable javascript object.
+
 
  
 
;Functions used by internal actions, you probably will not use
 
;Functions used by internal actions, you probably will not use
Line 79: Line 80:
 
*[[functions:mysqlquery2array|mysqlquery2array]] - converts a mysql query object to a multidimensional array
 
*[[functions:mysqlquery2array|mysqlquery2array]] - converts a mysql query object to a multidimensional array
 
*[[functions:itemLayout_dataString2Array|itemLayout_dataString2Array]] - converts the stored itemLayout_dataString for product item configurations into a useable array.
 
*[[functions:itemLayout_dataString2Array|itemLayout_dataString2Array]] - converts the stored itemLayout_dataString for product item configurations into a useable array.
 +
*[[functions:phpObjToJS|phpObjToJS]] - converts a PHP object (containing any combination of integers, numbers, strings, objects and arrays) into an outputable javascript object.

Revision as of 16:56, 27 January 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.
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
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.


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
  • mysqlquery2array - converts a mysql query object to a multidimensional array
  • itemLayout_dataString2Array - converts the stored itemLayout_dataString for product item configurations into a useable array.
  • phpObjToJS - converts a PHP object (containing any combination of integers, numbers, strings, objects and arrays) into an outputable javascript object.