I have a small problem with the Shipping by weight plugin. It is installed , active and works fine but it does not show the shipping price when viewing the cart.
It says I need to chose the shipping method even though I only have one.
If I go throo the steps in the final order page it shows the correct shipping price acording to weight.
Is there any way to make it show the price on the cart page?
It would require customization of the SHipping By Weight plugin, because it does not fully implement the GetFixedRate method:
/// <summary> /// Gets fixed shipping rate (if shipping rate computation method allows it and the rate can be calculated before checkout). /// </summary> /// <param name="getShippingOptionRequest">A request for getting shipping options</param> /// <returns>Fixed shipping rate; or nullincase there's no fixed shipping rate</returns> publicdecimal? GetFixedRate(GetShippingOptionRequest getShippingOptionRequest) { returnnull; }
Note, that the reason is probably that the configuration records can reference Country/State/Zip, and the address would not be known until selected during checkout. If you're always using "*" (wildcard) for the address fields in the config, then it would be safe to do the customization. (Or, I suppose you could lookup one of the customer's addresses and assume they will use same Country/State/Zip, although a Guest would not have any addresses.)
As indicated in the code comments, GetFixedRate() is a method (all) shipping provider plugins that allows such plugin to return a "rate can be calculated before checkout". You (or some developer) can modify the code to return a rate there.
public decimal? GetFixedRate(GetShippingOptionRequest getShippingOptionRequest)
This line gives this error:
Severity Code Description Project File Line Suppression State Error CS0116 A namespace cannot directly contain members such as fields or methods Nop.Plugin.Shipping.ByWeight C:\Users\mk\Desktop\nopsursa\Plugins\Nop.Plugin.Shipping.ByWeight\ByWeightShippingComputationMethod.cs 305 Active
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.