#15311
Richard Pomeroy
Participant

That makes no sense. In your example:

$ 390, Vitamin D3
$ 390, Vitamin D3
$ 390, Vitamin D3
$ 170, Vitamin B50 <– 4th item discounted
$ 170, Vitamin B50
$ 139, Biotin
$ 39, Vitamin C
$ 39, Vitamin C <– 8th item discounted

170 + 39 = 209

… your plugin decides to make a group based on price, but it is missing that fact that no one that is a store owner would ever do that. Whenever you go to a store and have a Buy 4 Get 1 You always get the cheapest one for free. So really your example below should look like this:

$ 390, Vitamin D3
$ 390, Vitamin D3
$ 390, Vitamin D3
$ 170, Vitamin B50
$ 170, Vitamin B50
$ 139, Biotin
$ 39, Vitamin C <- 8th item discount taken here
$ 39, Vitamin C <- 4th item discount taken here

$39 + $39 = 78