Wiki source code of SetTrkLink
Version 2.1 by Outhman Moustaghfir on 2022/09/21 17:22
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | = Introduction = |
2 | |||
3 | In this section, we will describe another XSLT function that links between 2 tracking. | ||
4 | |||
5 | = Parameters = | ||
6 | |||
![]() |
2.1 | 7 | SetTrkLink uses 6 params: |
![]() |
1.1 | 8 | |
9 | 1. trkID : tracking ID. | ||
10 | 1. trackingType: it refers to the type of tracking wanted. (eg : order , product, baseArticle ...) | ||
11 | 1. sensType: top (parent), bot (children), any (same level). | ||
12 | 1. trkIDCible :the tracking to be linked. | ||
13 | 1. trackingTypeCible: its type. | ||
14 | 1. reverse: optional param that allows the creation of an equivalent link on the other tracking.the default value is __false__. | ||
15 | |||
16 | = Uses = | ||
17 | |||
18 | We suppose that we have a tracking type named Product. It has 3 data (Name, Brand, and Country). | ||
19 | |||
20 | * if we want to link a product with trkID = '632061e5f8aef457701a28d3' to a tracking **parent **like 'Company' ( trkID = "Abcd") : | ||
21 | |||
22 | {{code language="XML"}} | ||
23 | <xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company')"></xsl:value-of> | ||
24 | {{/code}} | ||
25 | |||
26 | this will create a link only in 'Product' object. | ||
27 | |||
28 | * to set equivalent links between 'Company' and 'Product', we set reverse to __true__ : | ||
29 | |||
30 | |||
31 | {{code language="XML"}} | ||
32 | <xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company', 'true')"></xsl:value-of> | ||
33 | {{/code}} | ||
34 | |||
35 | this call is the same as : | ||
36 | |||
37 | {{code language="XML"}} | ||
38 | <xsl:value-of select="ixf:SetTrkLink('632061e5f8aef457701a28d3', 'Product', 'top', 'Abcd' , 'Company')"></xsl:value-of> | ||
39 | {{/code}} | ||
40 | |||
41 | {{code language="XML"}} | ||
42 | <xsl:value-of select="ixf:SetTrkLink('Abcd', 'Company', 'bot', '632061e5f8aef457701a28d3' , 'Product')"></xsl:value-of> | ||
43 | {{/code}} | ||
44 | |||
45 | |||
46 |