Shipping with Canada Post problem.

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

When I have only "By country and weight" it works;
When I have both "By country and weight" and Canada Post it gives me "Request for the permission of type 'System.Net.SocketPermission ... " error
When I have only Canada Post it gives me "Shipping options could not be loaded"

I have no country restrictions, and I have two shipping methods.

It's version 1.6 on GoDaddy.
What should I do to resolve the problem?
13 years ago
Hi there,
were you able to fix your problme?
I am having the same issue. Let me know if you found anything.
Thanks
13 years ago
No, nothing.
I decided to wait when Godaddy upgrades to 1.8 or 1.9. Hopefully there the issue is resolved. If not, I will have to go and try changing the code myself (by accident I am an ASP.NET programmer). It's just I didn't want to interfere with the GoDaddy's way of maintaining this app.

Otherwise, I tried all meaningful ways of making it work... No success.
13 years ago
Thanks for the reply. I have tried 1.8 and the issue still exists.
Do you know if we need to replace the default CanadaPost key (CPC_DEMO_XML)?
13 years ago
Eventually I upgraded to 1.9 manually. I changed some code to make it work though. The problem wasn't that bad, but still, when I chose countries where there were no states or provinces, nopcommerce gave me an error... So I did a workaround - I let it send whatever info there is to Canada Post and should there be an error- let it be coming from them, but not from Nopcommerce. They seem to have overprotected it...
13 years ago
In your CanadaPostComputationMethod.cs  

//if (shipmentPackage.ShippingAddress.StateProvince == null)
            //{
              
            //   // error = "Shipping state is not set";
            //    //return shippingOptions;

            //}

            try
            {
                var profile = new Profile();
                //use "CPC_DEMO_XML" merchant ID for testing
                profile.MerchantId = IoC.Resolve<ISettingManager>().GetSettingValue("ShippingRateComputationMethod.CanadaPost.CustomerID");

                var destination = new Destination();
                destination.City = shipmentPackage.ShippingAddress.City;
               // here is where we're feeding Canada Post with province data:
                if (shipmentPackage.ShippingAddress.StateProvince == null)
                    destination.StateOrProvince = string.Empty;
                else
                    destination.StateOrProvince = shipmentPackage.ShippingAddress.StateProvince.Abbreviation;
                destination.Country = shipmentPackage.ShippingAddress.Country.TwoLetterIsoCode;
                destination.PostalCode = shipmentPackage.ShippingAddress.ZipPostalCode;
13 years ago
Thank you. I really appreciated. I upgraded to 1.9 and the problem was solved. :)

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