I am trying to put a link in customer receipt that only shows is an administrator is displaying the receipt. Without conditional logic, it works fine (anyone can use it). Since notification.receipt.xml.config is created in Order.cs, I'm adding an additional param to the call (UserIsAdmin='true') as below:
var kboAdminStatus = ViewingCustomer.IsAdminUser ? "&UserIsAdmin=true" : "";
String PackageName = AppLogic.AppConfig("XmlPackage.OrderReceipt");
String result = AppLogic.RunXmlPackage(PackageName, null, ViewingCustomer, SkinID, String.Empty, "ordernumber=" + OrderNumber.ToString() + kboAdminStatus, false, true);
in notification.receipt.xml.config I've added the variable kboUserIsAdmin
<xsl:variable name="kboUserIsAdmin" select="/root/QueryString/UserIsAdmin" />
I set an if conditiontion to control the creation of the <a> link, which at this point never displays.
<xsl:if test="$kboUserIsAdmin = true()">
<!--Order Analysis Download-->
<xsl:value-of select="concat('kbo_Download_OrderCost.aspx?OrderNumber=', $OrderInfo/OrderNumber)" disable-output-escaping="yes" />
_Upload Order Cost
I don't seem to be able to get the variable passed into the XMLPackage. What am I doing wrong?