Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 08, 2012 @ 16:14
    Bjarne Fyrstenborg
    0

    Offer prices

    I am trying to make it possible the set an old price and then use the new price: http://sub.ak-security.dk/da/shop/radioer-plus-tilbehoer.aspx

    <xsl:variable name="oldprice">
        <xsl:if test="oldPrice != ''">
          <xsl:value-of select="teacommerce:FormatPriceWithSpecificCulture(oldPrice, $currentCurrency/@cultureName)" />
        </xsl:if>
    </xsl:variable>

    oldPrice is the property I use.. but on variants I not use the first variant offer price: http://sub.ak-security.dk/da/shop/brandmateriel.aspx

    The other price use the method GetPrices($variant) .. I'm not sure I can use it here? It seems that the prices is connected with the currencies in Tea Commerce section..

    Bjarne

  • Rune Grønkjær 1372 posts 3103 karma points
    Jan 08, 2012 @ 19:44
    Rune Grønkjær
    0

    Hi Bjarne,

    You can not use the GetPrices method for the old prices. Maybe you should get the old price with the GetProperty method on the $variant?

    /Rune

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 08, 2012 @ 19:48
    Bjarne Fyrstenborg
    0

    Hi Rune..

    Okay, I'll try that and see if I can solve this..

    Bjarne

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 09, 2012 @ 00:24
    Bjarne Fyrstenborg
    0

    I'm not sure if it does any difference whether using $variant/oldPrice or teacommerce:GetProperty($variant, 'oldPrice') ?

    But this seem to work:

    <xsl:variable name="oldprice">
        <xsl:if test="$variant/oldPrice != ''">
        <xsl:value-of select="teacommerce:FormatPriceWithSpecificCulture($variant/oldPrice, $currentCurrency/@cultureName)" />
        </xsl:if>
    </xsl:variable>
    .....
    .....
    <xsl:if test="$variant/oldPrice != ''">
        <span class="oldPrice">Før: <xsl:value-of select="$oldprice"/></span>
    </xsl:if>

    then a have both the oldPrice when the product list is loaded and when I change the variant.. I had a problem when just make the test with oldPrice != ' ' around the span.. I had to use $variant/oldPrice .. otherwise it wasn't displayed the oldPrice when the product list was loaded.. first when I changed to a variant on e.g. " Ildslukker " here: http://sub.ak-security.dk/da/shop/brandmateriel.aspx

    Bjarne

Please Sign in or register to post replies

Write your reply to:

Draft