Inhalte aufrufen

Error in Checkout Order in Debug mode


  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
7 Antworten zu diesem Thema

#1 Guest_user151748_*

Guest_user151748_*
  • Guests

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
  • 3801 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".

Marcus Gesing

Smartstore AG


#3 Guest_user151748_*

Guest_user151748_*
  • Guests

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
  • 3801 Beiträge

Geschrieben: 10 May 2017 - 16:39

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


Marcus Gesing

Smartstore AG


#5 Guest_user151748_*

Guest_user151748_*
  • Guests

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
  • 3801 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?


Marcus Gesing

Smartstore AG


#7 Guest_user151748_*

Guest_user151748_*
  • Guests

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
  • 3801 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.

Marcus Gesing

Smartstore AG