Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 4 of 4

Thread: You Save $x.xx - (x%) and Sale Price Tag on same line --?

  1. #1
    wing43215 is offline Junior Member
    Join Date
    Sep 2009
    Posts
    19

    Default You Save $x.xx - (x%) and Sale Price Tag on same line --?

    I am trying to add the Xsl value of sale price and the xsl if value of You Save $x.xx - (x%) on the same line. So it looks something like this:

    Regular Price: $x.xx
    Sale Price: $x.xx - You Save $x.xx (x%)

    So far I can get it on two separate lines - but not one. Any ideas?

    Code:
    <div>
                    <span>
                     <h4><xsl:attribute name="id">VariantPrice_<xsl:value-of select="VariantID"/></xsl:attribute></h4>
                     <h3><xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, number(HidePriceUntilCart), Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, TaxClassID)" disable-output-escaping="yes"/></h3>
    		<h5><xsl:if test="SalePrice > 0">You Save $<xsl:value-of select="format-number((Price - SalePrice),'##.00')" />  (<xsl:value-of select="100-(round((format-number (SalePrice div Price,'##.00'))*100))" />%)
    		</xsl:if></h5>
    		</span>
                                            </div>

  2. #2
    Skriver is offline Senior Member
    Join Date
    Apr 2012
    Posts
    188

    Default

    Were were using this once which gave our product as

    Sale (Amount) Saving (Amount) underneath. The Sale and Saving were String Resources.

    <div class="price"><xsl:value-of select="name:NDGetVariantPrice(VariantID, HidePriceUntilCart, Price, SalePrice, ExtendedPrice, Points, 'Sale', '', 'True', TaxClassID, '0.00')" disable-output-escaping="yes"/></div>

    Obviously the name:ND were our own value.

  3. #3
    wing43215 is offline Junior Member
    Join Date
    Sep 2009
    Posts
    19

    Default

    We are using 9.3 . Searched the sting resource for save and got nothing. I was hopeing it was somthing I could turn on or off, but it wouldn't solve the main problem. I want the sale price and the savings on the same line. I still can't find a way to manage this.

  4. #4
    webopius is offline Senior Member
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    440

    Default

    Unfortunately, the standard aspdnsf:GetVariantPrice() method generates a stack of html that some sites don't want.

    One way around this (that Skriver uses) is to write your own version of this method which then allows you to customise the HTML.

    Another way that sometimes works is to use CSS. If you can send the full HTML that is generated within the pricing <span> tags, I'll take a look and see if I can recommend some CSS that will do what you need.

    Adam