Buy n products at Total X

Vote:
 

Hi,

We have a requirement where customer have a promotion Buy 4 at Total £50. and when Customer have 3 items in basket a message will display to promote him buy another product so he could get this offer.

Items can be rom any category of any price.

How can we do this? i am looking for opinions.

In my opinion

We have to develop a custom promotion. to achive Buy 4 at Total 50.
To display a message in in Basket we can do it in two ways

1.
Create a custom Commerce customer Visitor Criteria Group that will do this for us, Editors will require to create those groups and add required items, On basket page content will be displayed based on this criteria. (Probably will be efficient way to do this)

2.
On visiting basket page, We can load some all/specific promotion and view items and then compares with items in basket. (will be poor in performance, potentially will involve direct DB access, high usage of DB)


Regards
Khurram

#133426
Sep 04, 2015 10:06
Vote:
 

Hi,

As I might not understand the whole requirement, my solution might not be complete, but here's the idea:

- Add a special flag, such as "SuperCool4Item50GBPDiscount", with type of bool, can be set by code. This will be synced manually with the promotion (will be disable when the promotion is expired,...)

- Everytime customer adds a item to the cart, you'll need to run the CartValidate workflow, so after this, you can check the number of items and order subtotal. If it does not satisfy the requirements and the flag is enabled, display the message.

So this will reduce a lot of database requests as all the things you use are already in the memory.

As I said I might not see the whole picture :)

Regards,

/Q

#133427
Sep 04, 2015 10:38
Vote:
 

:)

Lets make it bit generice,

Buy N at £X

...
I can't create N boolean :)

Any other idea?

Regards
/K

#133432
Sep 04, 2015 10:45
Vote:
 

So you will possibly have multiple promotions of that type at the same time?

#133438
Sep 04, 2015 12:43
Vote:
 

yes
/K

#133439
Sep 04, 2015 12:44
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.