I'm currently working on a solution which will allow a commerce manager to be able to configure shipping methods, and within each shipping method specify multiple shipping cases where the cost of shipping is determined by the following:
To fulfil that requirement I had anticipated having to add several additional ShippingMethodParameters :
And storing them against each individual case, but looking at the documentation this doesn't look possible as custom parameters are stored and referenced in respect of the shipping method. https://world.episerver.com/documentation/developer-guides/commerce/shipping/Shipping-methods/
Without having to build something custom, and store the shipping case data in a custom table in the database to achieve this result, does anyone have any advice or suggestions on how to accomplish this?
If it is only the price that differs i would suggest looking into implementing it as a custom shipping promotion.
I kinda ... disagree. In this case a shipping method would work much better. Yes it does not have the flexibility of a promotion, but it's much clearer on the concept - right tool for right job. By using promotion you would have to deal with prioritization and exclusion, and that can be ... complicated.
I don't have time to dig into the shipping parameters right now, but I think it's doable ...
Thank you both for your replies.
@Quan - could you elaborate on your answer at all please?
I have added a ConfigureShippingMethod usercontrol as the docs state, and was hoping I could store the additional custom parameters in reference to each case, but looking at the database schema, a parameter is stored in reference to a ShippingMethod using the ShippingMethodId.
Using the existing tables as they are, how did you see this working with respect to a case?
Could anyone provide any more on this at all?
Only other thing i can think of is to have a shipping method for each of your cases. I have used that successfully with Min and Max order value defined in parameters.
It will of course mean a lot more work administrating all the rest of the duplicated data, but if it is a small enough number of variations it might be an option.
Thanks for your reply. This is kind of what I am doing currently, but it has its limitations unfortunately.
For the combination of shipping cases were configuring, we obviously only want to show one method to the end user - if I create multiple shipping methods based on a specific shipping gateway, and then filter the methods using the current order total we can then just show the correct one to the user - this works fine in this scenario where we have one method, but in some instance we may want to have multiple shipping methods using this gateway, but then there is no way effectively 'group' the cases for each shipping method, using the min max criteria defined above.
What grouping are you after?
Could you add another ShippingMethodParameter with a group identifier?