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: Extended Pricing Display while using VariantsInDropDown

  1. #1
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default Extended Pricing Display while using VariantsInDropDown

    I have a question regarding the display of extended pricing...

    I'm using customer levels and extended pricing for 4 different groups. I'm also using the VariantsInDropDown for the page style. This works great in displaying the variants and their price, but I have a display issue / question:

    When a customer is logged in that belongs to a group, the drop-down menu crowds both the normal price, the customer level name, and the customer level price into the drop down. This makes it look very crowded and the customer cannot instantly tell which price they're going to pay (It only takes a second, but I can see it being annoying):



    Is there a way to have it just say "[level name]: [Price]" or something similar? I remember seeing a post from 1-2 years ago about using a choose statement, but I can't find it and am also wondering if there is an easier way. I'm using v9 with SP1 and the admin pack installed.

    Thank you in advance for any suggestions!

  2. #2
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default

    Any thoughts on this?

    I have tried XSL if test's and XSL choose / when statements in Product.VariantsInDropdown.xml without luck. It bypasses or is failing the check. I'm not sure if the coding is wrong or the logic simply won't work. The code I added / changed starts with the xsl:choose.

    Code:
    <option value="{VariantID}">
              <xsl:if test="IsDefault=1">
              <xsl:attribute name="selected">selected</xsl:attribute>
              </xsl:if>
    	<xsl:value-of select="$vName" />
    	<xsl:choose>
    	<xsl:when test="CustomerLevelID != 0">
                <xsl:value-of select="aspdnsf:GetVariantPrice(VariantID, HidePriceUntilCart, Price, SalePrice, ExtendedPrice, Points, $pSalesPromptName, $pTaxClassID)" disable-output-escaping="yes" />
    	</xsl:when>
    	<xsl:otherwise>
    							
                </xsl:otherwise>
    	/xsl:choose>			
    </option>

  3. #3
    tpmorgsls is offline Junior Member
    Join Date
    Oct 2009
    Posts
    27

    Default

    That is located at:

    ExtensionBase.cs (line 4017)


    Code:
    // handle discounted customerLevels
                else
                {
                    results.Append("<span class=\"RegularPrice\" >" + regularPriceLabel + regularPriceFormatted + "</span><br />");
                    results.Append("<span class=\"LevelPrice\" style=\"color:" + AppLogic.AppConfig("OnSaleForTextColor") + "\">" + customerLevelName + regularPriceLabel + discountedPriceFormatted + "</span>");
    
                    results.Append("&nbsp;");
    
                    results.Append(pointsFormatted);
                    results.Append(taxSuffix);
                }
    Just remove what you don't want and call it good.

    If you don't have source, your best bet is to remove the offending elements client-side. And that's craaaazy talk. But then again, using XSLT for business logic is like.... something really, really terrible.
    Last edited by tpmorgsls; 02-11-2011 at 04:37 PM.

  4. #4
    sha87 is offline Member
    Join Date
    Oct 2010
    Posts
    31

    Default

    Thanks for the response! I found that section in XSLTExtensionBase.cs, but changes I make there are not being reflected on my website - I even deleted the entire price section and it didn't change my website. Is there something I need to do to tie it into the product.VariantsInDropDown.xml package that i'm using?

    I Reset the Cache / ran IISreset without luck.
    Last edited by sha87; 02-14-2011 at 11:55 AM.