Developer forum

Forum » Templates » Best way of getting a shipping method fees

Best way of getting a shipping method fees

Joseph Vause
Reply

Hello,

I am currently modifying ShippingMethods_V2.cshtml and want to modify it so that when you select a shipping method, you can then select a fee associated with that Shipping Method.

For example:

We have Next Day Shipping Method which has three different fees associated with it, so when they select Next Day it should then render the fees assoicated with that Method.

I couldn't find any documentation on how to get Shipping Method Fees.

DW Version: 10.4.1 - Using Swift


Replies

 
Rasmus Sanggaard Dynamicweb Employee
Rasmus Sanggaard
Reply

Hi Joseph,

As an alternative, you could take a look at our Shipmondo integration, which supports DPD and their services, instead of mimicking the behavior yourself.

https://doc.dynamicweb.dev/documentation/implementing/ssr/Shipping-providers/Shipmondo.html?q=Shipmondo

https://shipmondo.com/carriers/dpd/

 

BR Rasmus Sanggaard

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Joseph,

The fee rules are used within a single selected shipper. It then looks at the rules (like dates, weight of the cart and so on) and determines the appropriate fee.

If you want the user to select among different options that have different fees, you could simply register the provider multiple times. So, instead of a single registration with three fees, you have three registrations with one fee. Then the user picks one, and the associated fee is used.

Hope this helps,

Imar

 

You must be logged in to post in the forum