I am using Merchello version 2.4.0 and I have an error getting the shipment rates.
I am using the code below and the method shipment.ShipmentRateQuoteByShipMethod(item.Key, false) always throws a null exception.
var key = Merchello.Core.Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey;
var rateTableProvider = MerchelloContext.Current.Gateways.Shipping.GetProviderByKey(key);
var shippingMethods = rateTableProvider.ShipMethods;
var shipment = this.Basket.PackageBasket(shippingAddress)?.FirstOrDefault();
if (shipment != null)
{
var item = shippingMethods.Where(s => s.Name == "Standard Shipping").FirstOrDefault();
var shipmentRate = shipment.ShipmentRateQuoteByShipMethod(item.Key, false);
Merchello Shipment Rates
Hello,
I am using Merchello version 2.4.0 and I have an error getting the shipment rates. I am using the code below and the method shipment.ShipmentRateQuoteByShipMethod(item.Key, false) always throws a null exception.
}
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.