Results 1 to 4 of 4

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

  1. #1
    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
    Join Date
    Apr 2012
    Posts
    168

    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
    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
    Join Date
    Nov 2008
    Location
    London, UK
    Posts
    432

    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

Posting Permissions

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