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 2 of 2

Thread: Quantity Discount Percentage Decimal

  1. #1
    dayhawk is offline Member
    Join Date
    May 2009
    Posts
    76

    Default Quantity Discount Percentage Decimal

    By default, when a quantity-discount percentage is applied, the decimal goes to the fourth place in the shopping cart. (5.0000%...)

    Would it be possible to shorten the number decimal places to one? (5.0%...)

    Thanks.
    MSx 9.2, SQL Server 2005, Windows 2008 R2 Web 64-Bit

  2. #2
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    I don't have v9 so I don't know whether this works in v9, but in our v8 shoppingcart.aspx.cs page we have the following:

    Code:
                //CartItems.Text = cart.DisplayItems(false, ThisCustomer, true);
                string strHTML = String.Empty;
                strHTML = cart.DisplayItems(false, ThisCustomer, true);
                strHTML = strHTML.Replace("00% Qty", "%<br />Qty");
                CartItems.Text = strHTML;
    We replaced the first commented out line, with the others to truncate the decimal places. Maybe you can use similar.
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!