Is it possible to limit shipping carrier by country?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
_shippingService.GetShippingOptions() accepts a "allowedShippingRateComputationMethodSystemName" parameter, so since you're already overriding PrepareShippingMethodModel() you could only load the relevant plugin per country by passing the system name:

public virtual GetShippingOptionResponse GetShippingOptions(IList<ShoppingCartItem> cart, Address shippingAddress, Customer customer = null, string allowedShippingRateComputationMethodSystemName = "Shipping.UPS", int storeId = 0)
4 years ago
af1racing wrote:
_shippingService.GetShippingOptions() accepts a "allowedShippingRateComputationMethodSystemName" parameter, ...


True, but he created a plugin to override PrepareShippingMethodModel.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.