• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Jim Carpenter
#1 Posted : Friday, March 18, 2016 10:37:01 AM(UTC)
Jim Carpenter

Rank: Member

Joined: 3/18/2016(UTC)
Posts: 5

Thanks: 1 times
Hello all,

I am trying to set up a tiered "insurance" fee to be added to my shipping rates that we are receiving from UPS, to be based on the cart total.

We have a UPS shipping provider configured and working as needed, but I need to add an additional amount to the order using the following pricing tiers.

<$100 --- no charge
$100-300 --- 2.70
>$300 --- 2.70 + .90 for every $100

I don't care how the charge is implemented:

  • It could be added to the shipping cost
  • It could be considered "handling"
  • If there is some other option avail, I'm open to that too


It seems to me that the "Wrapper" or "Order Rules" shipping methods should allow me to manually achieve what I am looking for, but they don't appear to allow for incremental costs IN ADDITION TO the UPS rates, based on the Order Subtotal.

When I select the cost to be "Rates From" UPS... it only allows me to set a multiplier... I really just need to add a fixed rate, to be added to the UPS cost.

I can't find any documentation on how they are supposed to work. Also, I would prefer to NOT have to manually define every $100 increment between $300 and +Infinity to account for all cart sizes.

Any thoughts or help would be greatly appreciated.

Thanks!

Edited by user Friday, March 18, 2016 10:52:18 AM(UTC)  | Reason: Not specified

Aaron
#2 Posted : Friday, March 18, 2016 11:03:02 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Jim,

It sounds like you have a pretty good handle on your options. It would be nice if the rule methods allowed you to add to the shipping cost as well as being able to multiply it.

The purpose of the Wrapper method is to 'wrap' any of the other methods to give them the ability to be hidden (notice the "Visible in Checkout" checkbox). The reason that you would use this is if you have an Order Rules or Package Rules method that conditionally gets rates from hidden methods (e.g. if order total < $100 get rates from UPS else set shipping amount to $0.00).

My recommendation is to override the handling fee. The great thing about doing this is that you don't have to modify how orders are calculated or make any database changes. All you need to do is create a custom workflow step to replace the "Apply Handling" workflow step that runs in the "Calculate Order" workflow. If you create your workflow step in the /App_Code folder you won't have to modify and recompile the Core assembly.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
 1 user thanked Aaron for this useful post.
Jim Carpenter
#3 Posted : Monday, March 21, 2016 2:30:09 PM(UTC)
Jim Carpenter

Rank: Member

Joined: 3/18/2016(UTC)
Posts: 5

Thanks: 1 times
Thanks again Aaron! Your suggestion was exactly what I needed to implement.

For the good of anyone stumbling across this post in the future with a similar problem, here is what I did to solve the problem.


  1. Copy-Paste the file "BVSoftware.Bvc5.Core\BusinessRules\OrderTasks\ApplyHandling.vb" to a new folder located at /App_Code/Workflows
  2. Rename the pasted file to "ApplyInsuranceAsHandling.vb"
  3. Update the "TaskId" and "TaskName" methods with a new GUID an new name respectively
  4. Updated the "Execute" method to include my custom login inside the "If (Not isPlaced)" condition
  5. Added a line to the file /App_Code/TaskLoader.Custom.vb to register my new OrderTask: result.Add(New BusinessRules.OrderTasks.ApplyInsuranceAsHandling)
  6. Log into BVAdmin. Go to Options -> Workflows. Edit "Calculate Order" and delete the "Apply Handling" entry. Select my new "Apply Insurance As Handling" OrderTask and add it to the end of the list.
  7. For clarity, I relabeled "Handling" to "Insurance" on the front-end cart checkout page, so customers would know what they are paying for.

Aaron
#4 Posted : Monday, March 21, 2016 2:35:13 PM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,393
United States
Location: Hummelstown, PA

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Awesome! Glad I could help. Thanks for posting the steps that you took to help out other users.
Aaron Sherrick
BV Commerce
Toll-free 888-665-8637 - Int'l +1 717-220-0012
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2024 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012