SetTrkLink
Version 2.1 by Outhman Moustaghfir on 2022/09/21 17:22
Introduction
In this section, we will describe another XSLT function that links between 2 tracking.
Parameters
SetTrkLink uses 6 params:
- trkID : tracking ID.
- trackingType: it refers to the type of tracking wanted. (eg : order , product, baseArticle ...)
- sensType: top (parent), bot (children), any (same level).
- trkIDCible :the tracking to be linked.
- trackingTypeCible: its type.
- reverse: optional param that allows the creation of an equivalent link on the other tracking.the default value is false.
Uses
We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country).
- if we want to link a product with trkID = '632061e5f8aef457701a28d3' to a tracking parent like 'Company' ( trkID = "Abcd") :
<xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company')"></xsl:value-of>
this will create a link only in 'Product' object.
- to set equivalent links between 'Company' and 'Product', we set reverse to true :
<xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company', 'true')"></xsl:value-of>
this call is the same as :
<xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company')"></xsl:value-of>
<xsl:value-of select="ixf:SetTrkLink('Abcd', 'Company', 'bot', '632061e5f8aef457701a28d3' , 'Product')"></xsl:value-of>