FixedRateShipping and Checkout as Guest !!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

I have a fixed rate for shipping, but when I try to check out as guest => in my shopping cart, Shipping cost and Total = Calculated during check out. Sub-total and Tax is ok = xx.xx usd. If I press the Check out button + Checkout as guest and then fill the shipping address => it displays the right amounts.

I want to display the fixed shipping cost + total since first step for guests. For registred users is ok from begining.

Current settings:
Shipping rate computation: only FixedRateShipping active
Only 1 shipping method
Free shipping over X = unchecked
Estimate shipping enabled = unchecked
Shipping origin country = not selected
Shipping origin state = Other ...
Shipping origin zip = empty

Shipping is taxable = unchecked

Am I missing something ?

Is it possible to get rid of Calculated during check out message and see fixed shiping cost for Guest ?

Please advise
13 years ago
It needs some customization:
1. Open the solution in Visual studio
2. Open \Shipping\Nop.Shipping.FixedRateShipping\FixedRateShippingComputationMethod.cs file
3. Replace GetShippingOptions method with the following one:

var shippingOptions = new List<ShippingOption>();

            if (shipmentPackage == null)
                throw new ArgumentNullException("shipmentPackage");
            if (shipmentPackage.Items == null)
                throw new NopException("No shipment items");

            var shippingMethods = IoC.Resolve<IShippingService>().GetAllShippingMethods(shipmentPackage.ShippingAddress != null ? shipmentPackage.ShippingAddress.CountryId: 0);
            foreach (var shippingMethod in shippingMethods)
            {
                var shippingOption = new ShippingOption();
                shippingOption.Name = shippingMethod.Name;
                shippingOption.Description = shippingMethod.Description;
                shippingOption.Rate = GetRate(shippingMethod.ShippingMethodId);
                shippingOptions.Add(shippingOption);
            }

            return shippingOptions;


4. Recompile the solution
12 years ago
Thanks Andrei for your quick reply, but it didn't work as expected.

So, I commented Shipping\ShippingService.cs at line 149:

//shipmentPackage.ShippingAddress = shippingAddress;
            if (null == shippingAddress)
            {
                shipmentPackage.ShippingAddress = this.ShippingOrigin;
            }
            else
            {
                shipmentPackage.ShippingAddress = shippingAddress;
            }

I don't know if it's 100% "kusher", but it works for me when I check out as guest + only fixed shipped rate.

Thanks again!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.