I am traying to get some values to retorn to a PublicInfomodel. In my personal plugin. How can i do it?
I need to bring the information that will be sent for shipping Method active:
I need get Estimated, Delivery, Price.
Please explain more about what you are trying to do?
(Have you looked at the source code of any of the existing shipping provider plugins?)
I´d like to know wich interface and methode i should use to retorn the values from estimated shipping active. I tried to use the IShippingRateComputed but, i need only reade the values from StimatedShipping.
it wouldn't work because I need to return values that are not of the same type to my model. how could i do?
public class ShippingDisplayService : IShippingDisplay
public async Task<GetShippingOptionResponse> GetShippingDisplayAsync(GetShippingOptionRequest getShippingOptionRequest)
var model = new PublicInfoModel()
Name = getShippingOptionRequest.Customer.Username,
Price = getShippingOptionRequest.Items.Sum(x => x.Product.Price).ToString()
var response = new GetShippingOptionResponse();
DisplayOrder = getShippingOptionRequest.Items.Count(),
return await Task.FromResult(response);
I dont understand what you are trying to do because those values you are returning in the plugin GetShippingOptionResponse do not relate to shipping ?
nopCommerce is expecting the Shipping Plugin to return shipping options defined as the same type that is define in the core.
So to return different type values you would need to be calling the plugin routine from somewhere else in the core code that can accept the new GetShippingOptionResponse you have defined
You would need to chage the core or copy and change the existing shipping interface and methods used i.e. Change the core to match what you have done in the plugin