Steve,
Sorry for the slow reply. I was hoping to prepare a blog post to answer your question in detail but with the BVC 2013 promo ending this week things have been busy. So, rather than delay my response any further I wanted to give you the top-level view of how to solve this problem.
Originally Posted by: SPCteam I need to set and check for the dollar amount of a specific vendor's products within an order, not the order as a whole.
Example:
Products from Vendor A reach a total of $40.
Vendor A has a minimum order policy of $75.
Our customer places $100 in products from Vendor B in cart.
Vendor A minimum order still hasn't been reached.
Order level minimum will not work, in this case.
I don't mind working with the code, but I don't want to change what doesn't need to be changed. I don't know if the answer to this need would be addressed with a "workflow", and if so, how would I go about creating one.
You're on the right track! Creating a custom order workflow step is the ideal way to solve this problem.
Take a look at the CheckForZeroDollarOrders workflow step in the Core. This can be found here:
\source\BVSoftware.Bvc5.Core\BusinessRules\OrderTasks\CheckForZeroDollarOrders.vb
Create a new class in the App_Code folder of your website (you may want to create a folder in App_Code to contain your custom code). Be sure to change the GUID value returned by the TaskId function; otherwise the application will confuse your new workflow step with the CheckForZeroDollarOrders workflow step.
In the Execute function you can use the OrderTaskContext object "context", which contains an Order object for the customer order, to check your order for minimum levels. If you encounter an order minimum that is not met your Execute function should return false, which will cause this workflow step's workflow to terminate and rollback.
If you want to get clever or hack-ish, depending on your point of view, you could re-purpose one of the Vendor object fields to enter the minimum order amount. Then your workflow step can look up the minimum for each vendor rather than having to hard code those values.
Once your workflow step is complete it's time to wire it up. Open the TaskLoader.Custom.vb class in App_Code. Use this class, rather than TaskLoader.vb, for any custom work. Find the LoadCustomOrderTasks method around line 15. Add an instance of your new workflow step to the OrderTask collection object "result". Now BV Commerce will recognize your new workflow step in the admin.
The final step is to add your newly created workflow step to the Checkout Selected and Checkout Started workflows.