Inhalte aufrufen

Profilbild

Error in Checkout Order in Debug mode


7 Antworten zu diesem Thema

#1 user151748

user151748

    Newbie

  • Members
  • Punkt
  • 6 Beiträge

Geschrieben: 10 May 2017 - 14:31

Hello everybody!

I had to change the ordering logic and in the process of debugging, when go to the «Shipping» section, I get an error 

[SmartException: At least one shipping rate computation method provider is required to be active.]
 SmartStore.Services.Shipping.ShippingService.LoadActiveShippingRateComputationMethods(Int32 storeId) in ...\SmartStoreNET-2.6.x\src\Libraries\SmartStore.Services\Shipping\ShippingService.cs:130
 SmartStore.Services.Shipping.ShippingService.GetShippingOptions(IList`1 cart, Address shippingAddress, String allowedShippingRateComputationMethodSystemName, Int32 storeId) in ...\SmartStoreNET-2.6.x\src\Libraries\SmartStore.Services\Shipping\ShippingService.cs:387
 SmartStore.Web.Controllers.CheckoutController.PrepareShippingMethodModel(IList`1 cart) in ...\SmartStoreNET-2.6.x\src\Presentation\SmartStore.Web\Controllers\CheckoutController.cs:192
 SmartStore.Web.Controllers.CheckoutController.ShippingMethod() in ...\SmartStoreNET-2.6.x\src\Presentation\SmartStore.Web\Controllers\CheckoutController.cs:606But in a configurator the «Shipping.FixedRate» method is marked as active.

If compile project in «Release», deploy project to IIS server, go to the app and do the same, then there is no error!

How to fix this error?



#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 2969 Beiträge

Geschrieben: 10 May 2017 - 14:55

Go to Configuration > Settings > All settings. Filter setting name by "ShippingSettings.ActiveShippingRateComputationMethodSystemNames"
and ensure that there is exactly one setting\record with value "Shipping.FixedRate" and store "All stores".

Schöne Grüße aus Düsseldorf,
Marcus Gesing


#3 user151748

user151748

    Newbie

  • Members
  • Punkt
  • 6 Beiträge

Geschrieben: 10 May 2017 - 15:56

Hello, Marcus!

 

In "All settings" there is one record with key = "shippingsettings.activeshippingratecomputationmethodsystemnames" Value = "Shipping.FixedRate" Store = "All stores value".

Error appears only when you launches project from Visual Studio (2015) in debug mode...



#4 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 2969 Beiträge

Geschrieben: 10 May 2017 - 16:39

Have you tried obvious things like toggling different computation methods, restart the application, compile the solution?


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#5 user151748

user151748

    Newbie

  • Members
  • Punkt
  • 6 Beiträge

Geschrieben: 10 May 2017 - 17:34

I tried the different compilation (Debug, Release, PluginDev), different computers with different operating system (Win7 / Win 8.1).  

 

And if launch Store from Visual Studio (F5), then always throw this exception then I try to go to choice Shipping Methods or Payment Methods (if comment out a  Shipping Methods choice in source code). 

 

Method "LoadAllShippingRateComputationMethods(storeId);" always returns empty collection (for Shipping).

 

May be SmartStore.Services needs to be launched as a service?



#6 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 2969 Beiträge

Geschrieben: 10 May 2017 - 18:07

No. Can you debug LoadActiveShippingRateComputationMethods to get the reason why it doesn't return any computation method?


Schöne Grüße aus Düsseldorf,
Marcus Gesing


#7 user151748

user151748

    Newbie

  • Members
  • Punkt
  • 6 Beiträge

Geschrieben: 11 May 2017 - 11:40

Hello, Marcus!

 

Can you tell me where reading RateComputationMethods from database?



#8 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 2969 Beiträge

Geschrieben: 11 May 2017 - 12:21

They are provided by plugins (IShippingRateComputationMethod implementation), for example by SmartStore.Shipping (Fixed-rate and By-total).
Fixed-rate method has no database storage, By-total uses dbo.ShippingByTotal table and By-weight dbo.ShippingByWeight table.

Schöne Grüße aus Düsseldorf,
Marcus Gesing




Auf dieses Thema antworten