Closed nvindice closed 2 years ago
Thank you for your PR!
The most important statement seems to be this one: unset( $prodIds[$listItem->getRefId()] );
Why did you replace the foreach
with a while
loop?
Exactly, the unset
does the work. However, I needed to remove the slice
from the original filter
(because otherwise too less items are fetched). The default slice size of 100 results could be too small with a big basket or in shops where items belong to many categories simultaneously. I did not want to guess a number of item<->category relations that would be a good limit, so I used the while loop.
OK, understood. There are two minor coding style issues and we can merge your PR if you fix them.
Yeah well, I used the original code including at least one of the style issues ;-) Fixed it.
Thanks a lot!
Could you please tag a new version soon? This IMO is a serious bug which leads to basket miscalculation. Thank you!
Tagged now (2021.10.21)
Thanks a lot!
When using the
Category
coupon decorator inonly
mode on basket items which belong to multiple allowed categories, their value was reduced multiple times.