I’m not running an e-commerce store but I’m using the add to cart method, basically its like a Netflix type platform displaying tv and film, click on title and it has an IMDb style page about the selected content. its set up like Netflix where you can browse content and click add to list, so clients can build a list of titles they want to licence, then on the cart page it displays this list and there’s a submit button that sends the list to us in an email.
this all works fine so far, however, how do I make it so it only adds the title to the list if it doesn’t already exist in the list?
for example, on the homepage there’s a RG displaying action titles and another RG displaying adventure titles. if a movie has both of these genres in the metadata it will appear in both RG’s, and if I click add to list on this title in both RG’s then I end up with 2 entries for the same movie. I’m not sure on the workflow, do I prevent it from adding to duplicates to the list or remove duplicates after? how would this be achieved?
this is how the DB is structured:
and the add to list workflow: