Try our conversational search powered by Generative AI!

Extending ShippingMethodCases with additional ShippingMethodParameter's - EPi Commerce 11.7

Vote:
 

Hi Everyone, 

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:

  • Based on the total cost of the order - and setting the lower and upper interval at which the price is valid.
    • i.e. if total order cost is between 200 -> 500 the price will be 5
  • Similar to the above scenerio, but working on a percentage of the current total
    • i.e. if total order cost is between 200 -> 500 the price will be 5% of the total order cost. 

To fulfil that requirement I had anticipated having to add several additional ShippingMethodParameters :

  • Total order cost from
  • Total order cost to
  • Percentage
  • Flat rate

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?

Thanks,

Paul

#193474
Edited, May 30, 2018 11:27
Vote:
 

If it is only the price that differs i would suggest looking into implementing it as a custom shipping promotion.

#193564
May 31, 2018 13:33
Vote:
 

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 ... 

#193565
May 31, 2018 14:05
Vote:
 

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? 

Thanks,

Paul 

#193641
Jun 01, 2018 15:33
Vote:
 

Could anyone provide any more on this at all?

#194546
Jun 25, 2018 11:05
Vote:
 

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.

#194559
Jun 25, 2018 14:21
Vote:
 

Hi Erik, 

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. 

Thanks,

Paul 

#194569
Jun 25, 2018 17:01
Vote:
 

What grouping are you after?

Could you add another ShippingMethodParameter with a group identifier?

#194570
Jun 25, 2018 17:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.