Developer forum

Forum » Ecommerce - Standard features » SUbscribers for fee calculations

SUbscribers for fee calculations

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

For a few of our sites we have a request to mark up the fee calculated by an existing shipping provider like UPS and USPS.How would we do this? There seems to be no events that allow us to tap into the calculation.

If there's no solution today, any chance we can have a OnAfterShippingFeeCalculated subscriber that gives us access to the order, the selected fee provider and the determined fee which we can then override?

Thanks,

Imar


Replies

 
Nicolai Pedersen
Reply

Hi Imar

Currently not possible. You can always inherit the shipping provider and route the calculation to the base class and add a couple of properties for you to use for additional calculation.

Is it always add X% or is it the usual rules of "on wednesdays when the sun is shining, add 1€ converted to $ using yesterdays currency rate - pi"? wink.
We could add the "Add X %" to the fee providers quite simple.

BR Nicolai

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Good question,not sure if it's rule driven or not, but I'll find out. Inheriting is also a good option, but it would be nice to have this in the box.

Thanks,

Imar

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

I know of two of these situations coming up for projects that I'm working with. One has a shiny sun on Wednesday situation, but the other is a simple adder. So, we'll put the simple % or $ adder to good use. And, we may be able to talk the customer of the other project to use that. 

Would it make sense to add an OnAfterShippingFeeCalculated subscriber while you're at it? That would give us an easy hook if we can't talk the shiny sun project into standardizing. 

Scott

 
Scott Forsyth Dynamicweb Employee
Scott Forsyth
Reply

Further to this, it sounds like it's even easier than I realized. Imar sent me a good example. So we can do both of my projects using the inheritance method above. That said, we'll likely put a $/% adder to good use in the future. We just don't need it in the near future now.

Scott

 

You must be logged in to post in the forum