Rank: Member
Joined: 7/7/2016(UTC) Posts: 3
|
Hi, Is there any way to-do a promo that limits the number of items AND the number of uses? E.g. I have a limit of 4 qualifying items per discount usage. I have 10 qualifying items in my cart. 4/10 would get discounted and the customer could do that for three orders. -- I'm pretty close to finishing a source code approach, but would prefer non-coded method or a workflow shim that will still apply all the other combined rules correctly in the site code. Let me know and thanks for your time! Edited by user Friday, July 8, 2016 1:30:43 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Member
Joined: 7/7/2016(UTC) Posts: 3
|
Moving forward with source code approach.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
As you've gathered, the out-of-the-box offers do not support this functionality so custom code will be required. However, there is a plugin architecture for Offers that you can leverage to create a new Offer without customizing the application core (so future upgrades are easier). Is that what you used? If not I can provide some guidance on how to do that. |
Aaron Sherrick BV Commerce Toll-free 888-665-8637 - Int'l +1 717-220-0012 |
|
|
|
Rank: Member
Joined: 7/7/2016(UTC) Posts: 3
|
The approach ended up setting an additional value in the "ComponentSettingsManager" for the relevant offer control and then leveraging that inside ProductsOfferTaskProcessor source code to be used with the product promotion limiting logic.
I'm guessing the reason something like this wasn't added to begin with is that the promo system discounts are working as a multiplier of the line item quantity - so there are odd rounding cases where it's off by a penny.
I wasn't aware of any plugin methodology - and without that knowledge of the "right" way to-do that, there was concern that the promos wouldn't then be applied/stack correctly to get the appropriate final price.
|
|
|
|
Rank: Administration
Joined: 4/2/2004(UTC) Posts: 2,393 Location: Hummelstown, PA Thanks: 6 times Was thanked: 163 time(s) in 158 post(s)
|
Originally Posted by: Lost And Lonely I wasn't aware of any plugin methodology - and without that knowledge of the "right" way to-do that, there was concern that the promos wouldn't then be applied/stack correctly to get the appropriate final price. Your customization approach makes sense. We recommend customizing through the built-in plugin architecture whenever possible. Sometimes, of course, that's not possible. In the case of Offers there is a plugin architecture. In a nutshell this is how you leverage it: - Create a new class in /App_Code for your offer that inherits from BVSoftware.Bvc5.Core.Marketing.OfferTaskProcessorBase (or another class that inherits from that class) and implement your custom offer logic.
- In the TaskLoader.Custom.vb file in /App_Code add an instance of your class in the LoadCustomOrderTaskProcessors method that looks like this:
Code:
result.Add(New ProcessorComponentPair("New Offer's Name", GetType(NewOfferClassName)))
This is how BV Commerce knows about your new offer. The string that you set here determines the name that you see in the admin as well as the folder name for the admin edit page (more on that next).
- If you need any special admin functionality for your Offer beyond the default settings, which most Offers do, create a folder with the exact same name that you specified above in the /BVModules/Offers/ folder (e.g. "New Offer's Name"). Inside that folder create a user control called Edit.ascx that inherits from BVSoftware.Bvc5.Core.Content.OfferTemplate.
That's it! Refer to the code of the other Offers for additional code examples. |
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.