Add drop ship fee for specific customer role - Shipping Director

1 month ago
Good day,

I am new to Shipping Director and using NopCommerce 3.80 version. Still learning tricks.

I am wondering how to add a drop ship fee from a given customer role (i.e. a Dealer) using Shipping Director. So far, what I see is adding optional fees. I wanted to add something like a mandated or required per order.

May your grace bless for every answer given. Thank you in advance.
1 month ago
In Shipping Director, in general, you can add a fee using the Surcharge Expression on an Option rule.  For example, based on a customer role:

Customer.IsnInRole("system name of your role") ? 5.00 : 0.00

The ? :  is the ternary if-then-else operator.  I.e.  if IsInRole() then 5.00 else 0.00

If you have more specific needs, then contact us at support at noptools.com and Export your configuration and send it  to us.
1 month ago
Thank you for your gracious reply.

I am hoping something like :

if Customer.CustomerRoles.Any(SystemName.Contains("Admin")) ? Add a fee of n amount on all shipping rates otherwise, 0.00.

I don't want it to be an option. Rather, an imposed fee.

Hope that make sense. Thank you
1 month ago
If you using nopC 3.80, then you can still access Customer.CustomerRoles, so it's the same as I indicate above:  add a fee using the Surcharge Expression on an Option rule.  For example, based on a customer role containing "Admin":  e.g.

Customer.CustomerRoles.Any(SystemName.Contains("Admin")) ? 5.00 : 0.00


I'm not sure what you mean by "I don't want it to be an option. Rather, an imposed fee."
The above example make the fee 'conditional', depending on the role.  The "Option" I refer to is the type of the Shipping Director rule.
1 month ago
All good now.

You're right!
I should use Surcharge Expression for additional fee.

Many thanks for your help. May the grace bless you