Results 1 to 2 of 2

Thread: Getting AppConfig values

  1. #1
    Join Date
    Feb 2009
    Posts
    683

    Default Getting AppConfig values

    Lets say I have an appconfig Foo.ShipDiscount that has a number like 10. I want to get that value and test for it in the receipt xml package

    Code:
    <xsl:variable name="shipCouponAmount" select="number(receipt:EvalDecimal(aspdnsf:AppConfig('Foo.ShipDiscount'))" />
    
    <xsl:if test="$shipCouponAmount > 0">
        do some cool stuff here
    </xsl:if>
    Obviously the above doesnt quite work, but what would work? How do I populate the variable from the appconfig and do it as a number?

    Thanks

  2. #2
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    Not sure what it's not working...looks pretty much spot on. For example, this works as expected
    Code:
    <xsl:variable name="vConfig" select="number(aspdnsf:AppConfig('NumAppConfig'))"/>
     
            <xsl:if test="$vConfig > 0">
              Greater than 0: <xsl:value-of select="$vConfig"/>
            </xsl:if>
    Attached Images Attached Images
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •