This article explains Cart item duplicate check together with Basket item overlap test, and it also covers Designing check criteria.