On the Shopify cart screen, there are cases where you want to display recommended products only when the cart is empty, and hide them when there are products in the cart. For example, if you want to display a specific collection using the "Featured Collections" section, you can make a few changes to the beginning of liquid to specify the hide conditions.
An example of a setting for the theme "Dawn" where the "Featured Collection" is displayed only when the cart is empty and hidden once an item is added to the cart.

[How to set it up] Add the code to the beginning of "sections/featured-collection.liquid"

