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

Thread: Setting Cart Total

  1. #1
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Default Setting Cart Total

    In code, where or how can I set cart.Total?

    I have custom code that changes the order total for the cart but I haven't found where to set the cart.Total.

    Any direction would help.

    Thanks,
    Zach
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)

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

    Default

    This is a confusing question. To change the total, you do stuff to the shopping cart. The total is calculated, not set. You can do this programatically several ways. In code-behind reference the customer, reference the cart class and add to it.

    If you just need to add some arbitrary fee, do it with a built-in feature. This product does not lack for them... I'm glad to give you any guidance, I'm certain I can help, but I need more specifics on the problem you're trying to solve.
    Last edited by tpmorgsls; 10-27-2010 at 03:59 PM.

  3. #3
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Default

    Thanks for responding but the fee that is added is different each time or in different scenarios.

    I just keep seeing that cart.Total is setting some variables. I'm trying to figure out where cart.Total sets itself.
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)

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

    Default

    Apart from in the core app cs file shoppingcart.cs there is also the stored procedure aspdnsf_GetCartSubTotalAndTax
    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!

  5. #5
    ZachJ85 is offline Senior Member
    Join Date
    Apr 2010
    Location
    Philadelphia, PA
    Posts
    99

    Default

    Ty, that's what I was looking for. I was in ShoppingCart.cs but was unaware of the SP and just seeing if anything else was "setting" cart.Total.

    Thanks,
    Zach
    SQL 2008, Visual Studio 2010
    Source: C#
    Version: AspDotNetStorefront ML 8.0.1.1/8.0.1.1
    Framework: .Net 4.0 (Running)