Thanks Giulio,

that confirms the results of our analysis.

We will now implement a relatively easy solution by extending the PromoCode entity with a new flag which says that it can only be used exclusively per order.

The validation when entering a promo code will be enhanced to check

- if either an exlusive code is entered while others are already applied

- or if there is already an exlusive promo code applied when entering a promo code.

In either case, a message will be rendered to the user interface.

This will be sufficient for our use case. Once this is field tested, we will contribute this back to the project.

I also like the approach using promo relations, that would offer more flexibility. Looking forward to this.

Thanks and best regards,

Michael Brohl

ecomify GmbH - www.ecomify.de


Am 17.11.22 um 10:15 schrieb Giulio Speri - MpStyle Srl:
Good morning Michael,

as per our experience using OFBiz e-commerce with promotions and promo
rules I can tell that there is no direct way to reach that "mutual
exclusion" for promotions.
Indeed the ProductPromos available on the store are processed one after
another, evaluating each by itself; so if you have 3 promotions and all
three have valid conditions, then they will be all applied to the order.

We were starting to think of a possible solution to this, since many of our
customers asked for this kind of exclusion for promotions (in particular
for promocodes).

I think that to reach this goal we need an entity where we can store this
relation between promos, something like:
PROMOTION_FROM:PROMOTION_TO:PROMO_COMPATIBLE[Y/N]
(:FROM_DATE:THRU_DATE:SEQ_NUM,...whatever fields useful for relation
handling)

Obviously the potential bad side of this is that if this entity grows a
lot, the system could spend a lot of time in this evaluation process.

If I am not wrong Magento should handle the promo exclusion in a similar
way.

This could be an interesting new feature for OFBiz e-commerce plugin.

Giulio

Il giorno gio 17 nov 2022 alle ore 05:38 Ashish Vijaywargiya <
ashish.vijaywarg...@hotwaxsystems.com> ha scritto:

Hello Michael,

I hope you are doing well.

Please refer to the following document written by Jacopo:

https://www.hotwaxsystems.com/ofbiz/ofbiz-development/product-promotion-engine/

I am not saying that this document will solve your use case but will help
you think on this side as well.
After this you can try creating some promotions at your end and see if it
suffices your need.

Please explore "Use Limit Per Order" and "Use Limit Per Customer" fields as
well:

https://demo-next.ofbiz.apache.org/catalog/control/EditProductPromo?productPromoId=9012

And the same fields with respect to PromoCode as well:

https://demo-next.ofbiz.apache.org/catalog/control/FindProductPromoCode?productPromoId=9012


--
Kind Regards,
Ashish Vijaywargiya
Vice President of Operations
*HotWax Systems*
*Enterprise open source experts*
http://www.hotwaxsystems.com



On Wed, Nov 16, 2022 at 9:13 PM Michael Brohl <michael.br...@ecomify.de>
wrote:

Hi everyone,

is there an out-of-the-box solution for the following promotion scenario:

Prevent a per product or product category promotion if there is already
a per order promotion active.

So if there is already an order percent or flat amount discount, any
other (additional) promotions should be discarded and the user should be
informed that those promotions cannot be combined.

Any hints?

Thanks and regards,

Michael




Reply via email to