I have been building a feature that hides/shows elements when a specific product_id is added to the cart. What I would want is if the specific ID shows up in the cart array, some elements will be hidden/disabled on the main page.
This is a visual demonstration of what I would want to achieve
I am done setting up the hiding/showing of the buttons but I’m stuck with finding the correct function that looks up the productId being added to cart. I’m looking at the getCurrentCart() method.
Would appreciate it if you can help me.