XSTL Extension Base Code Functions

 
Content
  1. XML Packages

  2. Extension Static Functions


XSLT Extension Functions are methods called by xml packages to get extra output to complete the whole html. These functions could be a call to database or server codes that does specific things like conversion, read to folders or files and etc.

XML Packages are XSLT files used by the website to make some of the designs and web pages become modifiable and switchable through the Connected Business Application.

Example XML Packages:

  • product.SimpleProduct.xml.config
  • product.kitproduct.xml.config

The XSLTExtensionBase.cs is a class inside the InterpriseSuiteEcommerceCommon DLL that contains these XSLT Extension Functions.

To call an extension function users must first add prefix of ISE followed by a colon (:) then the function name.

Example: ise: RegisterProduct, ise: Encode.

This will also help the users to identify if the line of code is calling from Extension function or not.

Example Extension Functions:

  • RegisterProduct
  • DisplayProductImage
  • Encode
  • ProductShare

Here are the list of XML Packages and the Extension functions.

 

XML Packages

EXTENSION FUNCTIONS PARAMETERS DESCRIPTION XML PACKAGE RESTRICTION
RegisterProduct Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
IncludeMatrixItems (Optional)(true/false): value which tells the function when to include the JavaScript for the Product Matrix Details.
Section that Registers the JavaScript for the product.  
DisplayProductImage Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
SEAltText (Optional) (string):
The alt text for the image when shown in the page.
Section that gets the product image URL and displays the image in the page.  
ProductNavLinks Counter (numeric):
Product ID
EntityCode (string):
Either category, department or
Manufacturers Code to tell to the navigation where to go back once click the up arrow.
Section that displays the arrow navigation beside the product details to easily view the next product, previous viewed product or go to top category or department.  
ProductShareControl
- Call a sub section inside the product.helper.xml.config
Counter (numeric):
Product ID
CategoryID(string):
Category ID which the product is belong
Product Name(string):
Product Name
Section for social media.
Facebook, Twitter and Etc.
 
DisplayExpectedShipDate Counter (numeric):
Product ID
ItemCode (string):
Product Code
ShipDate(string-dateformat):
The shipment date
ItemType (string):
Product Type
Section that displays product expected ship date.  
DisplayPrice Counter (numeric):
Product ID
ItemCode (string):
Product Code
Section that display the product price.  
DisplayNotifyOnPriceDrop Counter (numeric):
Product ID
ItemCode (string):
Product Code
ProductURL(string):
Not in used
Section that shows the button for user to request when the product price drops.  
DisplayPricingLevel Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
Section that Displays the pricing details of the product.  
DisplayAddToCartForm
- Call a sub section inside the product.helper.xml.config
Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
Section that Displays the button for add to cart and wish list. Including the quantity input box and the unit measure.  
DisplayStockHint Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
Section that Displays the stock information of the product (Available or out of stock)  
DisplayNotifyOnItemAvail Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
ProductURL(string):
Not in used
Section that shows the button for user to request when the product is available.  
GetSubstituteProducts ItemCode (string):
Product Code
Section that shows the possible items substitute for the current product.  
GetAccessoryProducts ItemCode (string):
Product Code
Section that shows the product accessories.  
GetAlsoPurchasedProducts ItemCode (string):
Product Code
Section that shows the related items purchased for current product.  
GetAlsoViewedProducts ItemCode (string):
Product Code
Section that shows the related viewed items for current product.  
ProductRatings ItemCode (string):
Product Code
Section that shows the product ratings.  
ProductCommentsControl
- Call a sub section inside the product.helper.xml.config
ProductURL(string):
Product URL
Section that shows the social media comments for the current product.  
DisplayKitItemOptions Counter (numeric):
Product ID
ItemCode (string):
Product Code
Section that shows the social media comments for the current product. Restricted to product.kitproduct.xml.config
GetJSPopupRoutines      
ProductDescriptionFile Item Code(string):
Product Code
IncludeBRBefore:
(true/false)
Add a BR after the description.
Get the product description using file the filename Restricted to product.productbrowser.xml.config
GetProductComparePanel IncludeJavascript (true/false):
Add the script if true and vise versa
Helper Xml Package (string): Helper package
Section that display the product compare details.  
SetXmlPackageHelperTemplate Index (integer):
The helper package index to use.
A setter function that tells the code to use the index (numeric) helper package for the next Extension function call.  
GetProductAttributeTable ItemCode (string):
Product Code
Section that display the product attributes. Restricted to
producttabcontrol.xml.config
ProductRatings
- Call a sub section inside the product.attributetable.xml.config
ItemCode (string):
Product Code
Section that displays the product rating.  
LocateImageURL Image File Name (string): Get the image filename and locate the image absolute pate to display on the webpage.  
EntityLink Entity ID (string):
EntityCode
SE Name (string):
Actual Entity Name
EntityName (string):
ISE Entity Name (Department, Category and etc.)
Create a link reference of the entity to place at the link HREF html element.  
GetSearchFormValidatorScript Form ID(string): HTML form ID
SearchTextId (string):
Text value to search.
Section that Registers the JavaScript for the search validation.  
DisplayEntityPageHeaderDescription Entity Name (string):
Actual Entity Name
Entity ID (numeric):
Entity ID
Entity Code (string):
Entity Code
Size (string) (Optional):
Icon, small, medium or large
Section that displays the header description when viewing entities.
Like departments, categories etc.
 
EntityPageFilterOptions Entity Name (string):
Actual Entity Name
Entity ID (numeric):
Entity ID
SectionFilterName (string):
CATEGORY, DEPARTMENT MANUFACTURER
CategoryFilterName (string):
Actual Category Name
ManufacturerFilterName (string):
Actual Manufacturer Name
ProductTypeFilterName (numeric):
Assembly = 1
Electronic Download = 2
Kit = 3
Matrix Group = 4
Matrix Item = 5
Non-Stock = 6
Service = 7
Stock = 8
Section that displays the Filter options for entities.  
SortingControl
- Call a sub section inside the productsorting.xml.config
  Section that displays the sorting menu to sort the displayed entity or product list.  
GetMLValue XmlNode (string):
Locale (string) (Optional):
Current Locale. (en-us, en-gb)
XMLEncodeOutput (true/false) (Optional): If true output value is encoded.
Get the value of xml node using the description.  
LookupEntityImage Entity ID (numeric):
Entity ID
Entity Name (string):
Entity Name
DesiredSize (string):
Icon, small, medium or large
IncludeTag (true/false):
Not Used
Display the Entity Image  
CreateCompareCheckbox
- Call a sub section inside the productcompare.xml.config
Item ID (numeric):
Item Counter
Display the checkbox for comparing two products.  
ProductandEntityLink Product ID(string):
Product Counter
SEName(string):
Product Description
Entity ID(string):
Entity Counter
Entity Name(string):
Category, Department or
Manufacturers
IncludeTag(numeric)(0 or 1):
If 1 include the link html element rather than href only.
Create a link with a combination of product and entity.  
MatrixAttributes Counter (numeric):
Product ID
ItemCode (string):
Product Code
ItemType (string):
Product Type
Align (string):
(vertical or v)
Section that displays the attribute selections for Matrix items and load its corresponding Javascript.  
DisplayQuantity Counter (numeric):
Product ID
DisplayPrompt(true/false):
If true add additional text after the quantity input box
ItemCode (string):
Product Code
ItemType (string):
Product Type
Section that displays the quantity input box.  
ShowStockHints ItemCode (string):
Product Code
Section that displays the stock availability of the product.  
FormatStringForLink Value(string): Convert the string value to ISE URL naming.  
GetLinkForMatrix ItemCode (string):
Product Code
Get the HREF value of the matrix item.  
ProductLink Product ID(string):
Product Counter
SEName(string):
Product Description
IncludeTag(numeric)(0 or 1):
If 1 include the link html element rather than href only.
Create a link of the product.  
GetPriceForMinicartItem ItemCode (string):
Product Code
ItemType (string):
Product Type
Cart ID(string):
Shopping Cart ID
Display the price value for the item in the mini-cart.  
GetKitPricePackage ItemCode (string):
Product Code
WithCurrencySymbol(numeric)(0/1):
If 1 include the currency symbol ($)
Display the price value for the kit item in the mini-cart.  
GetProductPrice ItemCode (string):
Product Code
WithCurrencySymbol(numeric)(0/1):
If 1 include the currency symbol ($)
Display the price value for the item.  
GetFreeStock ItemCode (string):
Product Code
Get the item free stock  
IsCBNMode   Get the value if the system sets to CBN Mode. (true or false)  
ProductRatingStars ItemCode (string):
Product Code
Section that displays the product ratings.  
ProductEntityList ItemCode (string):
Product Code
EntityName(string):
Entity Name
Section that displays the List of entities connected to this product.  
CategoryLink Category ID(string):
Product Counter
Formatted ISE Link name(string):
Formatted ISE Link name
Include Tag(1/0):
If 1 the link element will be included.
Create a link for the category  
SectionLink Department ID(string):
Product Counter
Formatted ISE Link name(string):
Formatted ISE Link name
Include Tag(1/0):
If 1 the link element will be included.
Create a link for the department/Section  

 

Extension Static Functions

EXTENSION FUNCTIONS PARAMETERS DESCRIPTION
StrToUpper Value(string): Convert the string value to uppercase.
StrToLower or ToLower Value(string): Convert the string value to uppercase.
EvalBool Value(string): If (TRUE | YES | 1) then its true Evaluate the value if possible Boolean.
FormatDate Date Value(string):
Date Value
Format (string):
MM/dd/yyyy, dd/mm/yy and etc.
Convert the string date value to specific format
FormatCurrency CurrencyValue(string): Format the price based to the currency.
UrlDecode Value(string):
String value to encode
Encode the string input for proper url value.
UrlEncode Value(string):
String value to encode
Encode the string input for proper url value.
Decode Value(string): Decode the value if it is encode to properly display the text on the web page.
Encode Value(string): Encode the value to properly display the text on the web page.
StrFormatStringresource Resource Name(string):
String resource name
FormatParams(string):
String delimited
Delimiter(string):
Delimiter for the Format Params
Format the string resource value base from the FormatParams and delimiter.
StringResource Key (string):
key to get the resource value
Methods the get the resource value from IS App and display it in HTML
GetNativeShortDateString Date Value (string) Convert the date value to short date value.
(1/1/2012)
AppConfig Config Key(string): Get the IS Configuration value using a key.
AppConfigBool Config Key(string): IS Configuration key to get Get the IS Configuration value using a key and convert it to a (true/false) value.
GetSkinID   Get the current skin set by the website.
Topic Topic Name (string): Topic name configured in IS App. Get the topic value from IS App.

 

Back to Top

  • Wednesday, 24 October 2012