cancel
Showing results for 
Search instead for 
Did you mean: 

user belong to multiple groups or work around

user belong to multiple groups or work around

It's my understanding you can not add a user to multiple groups.  With that said I need a solution to our discounting set up. 

 

Here is the use case.  we have tier pricing.  there are 12 pricing groups.  This is easy to do with magento 2.  The problem is when we want to add cart price rules on top of that.  for example

 

tier pricing, 12 groups get per product discount assignments based on this http://www.magetraining.com/blog/magento-2-what-has-happened-to-group-price/  for example a t shirt cost $40 none group and group pricing follows

trGroup 1 =  $38

trGroup 2 =  $36

trGroup 3=  $34

trGroup 4 =  $32

trGroup 5 =  $30

etc

 

This works fine.  but then we want to also apply volume rules on top of the.  BUT we need 4 different volume pricing groups.  This works fine alone too.  But how can we stack the the two without the ability of assigning a user to two groups

 

Then there are 4 cart rules groups

crtGroup 1 gets 5% off on $100 10% off on $200 etc

crtGroup 2 gets 10% off on $100 15% off on $200 etc

crtGroup 3 gets 15% off on $100 20% off on $200 etc

crtGroup 4 gets 20% off on $100 15% off on $200 etc

 

Now I need a user to be part of trGroup 1 and crtGroup 1 and another user to be trGroup 5 and  crtGroup 1 and another user to be trGroup 1 and crtGroup 4.  Now this does not appear to be possible without custom code.  Is there any other way to do achieve this type of discounting without custom code?

 

Hope this makes sense

 

5 REPLIES

Re: user belong to multiple groups or work around

If I understand your requirement correctly, there is no way around it withoug custom code.

 

We recently implemented something similar:

 

- added a customer attribute "price group" (multiselect)

- added a catalog rule condition type "customer price group" - rules with this condition are  not actually used to build the price index

- for logged in customers, recalculate the final price based on these catalog price rules with customer price groups on the fly

 

From this outline you can imagine that it is not a trivial task. But I'm interested in hearing other possible solutions.

 

One reason why it's complicated, is how the price indexing works in Magento. The price is looked up by website and customer group. With multiple customer groups this cannot work anymore (you'd have to create an index entry for every possible groups combination)

Re: user belong to multiple groups or work around

Hi @davejina,

 

Correct me if I'm worng but you're creating a set of rules (tier prices and cart rules) to apply discounts.

Magento won't allow you to assign (out-of-the-box) more than 1 group per customer (you'll find old questions and answers about this topic on Magento 1 but the solutions were incomplete or fails).

Now Magento is applying the rule but you have at least 1 customer that should apply to promotion but he can't because groups.

 

Is this a general issue with rules and customers or just an exception on some cases?

 

Also, you said "I need a user to be part of trGroup 1 and crtGroup 1 and another user to be trGroup 5 and  crtGroup 1 and another user to be trGroup 1 and crtGroup 4.".

 

I understand that trGroup is the user group assigned on tier price and crtGroup is the group assigned on cart rules.

Is it possible that you can rethink the approach?

If seems that you're are talking about groups on tier prices and cart rules as something different than Cutomer Groups.

 

Following your example, I'll use to standard groups from Magento:

 

Tier prices

Group General =  $38

Group Retailer =  $36

Group Wholesale =  $34

 

Cart Rules

Group General = gets 5% off on $100 10% off on $200 etc

Group Retailer = gets 10% off on $100 15% off on $200 etc

Group Wholesale = gets 15% off on $100 20% off on $200 etc

 

And now you're saying that you need customer John Doe has, for example, Retailer for Tier prices and Wholesale for cart rules.

Am I understanding your problem?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: user belong to multiple groups or work around

Yes that is correct,  you are following correctly.  

 

We have thought out a work around but due to the amount of products it's not feasible or elegant.  We have created cart pricing groups multiplied by catalog pricing groups.  see below.  The problem with this is all our products are configurable with different prices for each variant, with each product averaging 6 varients.  The total amount of groups we have is about 60.  That makes each product have 360 price variants for each product.  We have 15000 products.  Creating 5.4 million records.  As you can see this becomes a challenge to import into Magento and manage.  If we were able to assign a user to two groups this would be exponentially smaller to just 1mill.  If you have any other ideas how to make this work I am excited to hear them.

 

Based on your example 

tier price group = TG

cart rule Group = CG

so our group structure looks like

TG1CG1

TG1CG2 John doe belongs here so he gets the product for $36 and 15% off on $100 20% off on $200 etc

TG1CG3

TG1CG4

TG2CG1

TG2CG2

TG2CG3

TG2CG4

etc..

 

Re: user belong to multiple groups or work around

@davejina,

 

You won't be able to do that with Magento at least you're using Magento EE and Customer Segments.

In that case Cart Rules can be created to match with a specific segment.

If not, I know there are modules that allows you to have segmentation on Magento CE.

I can't recommend a module but you'll find a few options.

 

Another idea could be to create a custom rule with your logic. In that case maybe this presentation could give some ideas: http://es.slideshare.net/ivanchepurnyi/hidden-secrets-of-magento-price-rules

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: user belong to multiple groups or work around

We have figured out a work around.  Its not pretty though.  We have multiplied the user groups so cart rules groups X catalog rules.