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

Thread: Minimum Shipping Charge

  1. #1
    StokesWebDevelopment is offline Junior Member
    Join Date
    Jul 2009
    Location
    Walnut Cove, NC
    Posts
    20

    Default Minimum Shipping Charge

    I have a client that needs to set a minimum shipping charge of 5.95 while using Real time shipping. Is this possible without customization?
    Randall Moore | Web Developer
    Stokes Web Development
    www.stokesweb.com

  2. #2
    George the Great is offline Senior Member
    Join Date
    Nov 2006
    Location
    Cleveland, OH
    Posts
    1,792

    Default

    You'll need to make modifications for this, but they aren't terribly difficult mods. In the ShoppingCart class, near the bottom of the GetRTShippingRates method, you'll find a foreach loop going through each of the shipping methods
    Code:
    NumberFormatInfo usNumberFormat = new CultureInfo("en-US").NumberFormat;
    
    foreach (RTShipping.ShippingMethod s_method in s_methods)
    {
    Immediately inside of this foreach loop, you would check the rate of the method, and if less than 5.95 set it to 5.95...eg.
    Code:
    NumberFormatInfo usNumberFormat = new CultureInfo("en-US").NumberFormat;
    
    foreach (RTShipping.ShippingMethod s_method in s_methods)
    {
        if (s_method.ServiceRate < 5.95M)
        {
            s_method.ServiceRate = 5.95M;
        }
    You could even create a custom appconfig for minimum shipping charge and use that so if you need to change the minimum charge in the future you don't have to recompile
    Code:
    NumberFormatInfo usNumberFormat = new CultureInfo("en-US").NumberFormat;
    
    foreach (RTShipping.ShippingMethod s_method in s_methods)
    {
        if (s_method.ServiceRate < AppLogic.AppConfigNativeDecimal("RTShipping.MinimumShippingCharge"))
        {
            s_method.ServiceRate = AppLogic.AppConfigNativeDecimal("RTShipping.MinimumShippingCharge");
        }
    And that's all there is to it
    <a href="http://www.aspdotnetstorefront.com">Shopping Cart Software</a>

  3. #3
    StokesWebDevelopment is offline Junior Member
    Join Date
    Jul 2009
    Location
    Walnut Cove, NC
    Posts
    20

    Default

    Thanks a bunch George. That is perfect!
    Randall Moore | Web Developer
    Stokes Web Development
    www.stokesweb.com