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

Notification

Icon
Error

Lost And Lonely
#1 Posted : Thursday, July 7, 2016 4:43:37 PM(UTC)
Lost And Lonely

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

Lost And Lonely
#2 Posted : Friday, July 8, 2016 10:28:06 AM(UTC)
Lost And Lonely

Rank: Member

Joined: 7/7/2016(UTC)
Posts: 3

Moving forward with source code approach.
Aaron
#3 Posted : Friday, July 8, 2016 11:55:54 AM(UTC)
Aaron

Rank: Administration

Joined: 4/2/2004(UTC)
Posts: 2,381
United States
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
Lost And Lonely
#4 Posted : Friday, July 8, 2016 1:19:15 PM(UTC)
Lost And Lonely

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.
Aaron
#5 Posted : Wednesday, July 13, 2016 9:12:01 AM(UTC)
Aaron

Rank: Administration

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

Thanks: 6 times
Was thanked: 163 time(s) in 158 post(s)
Originally Posted by: Lost And Lonely Go to Quoted Post
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:

  1. 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.
  2. 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).
  3. 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.

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