Skip to product information
1 of 1
Published:2024.07.25

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.

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.

Applications

  • Blog management and editing

How to implement

  • LIQUID
  • HTML/CSS
View full details

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"


After making a purchase (all items are ¥0), you will be able to view the sample code.

If you have already made a purchase, please login here.

Sample Codes

Test Theme :Dawn/Rise 15.2.0

Add the code at the beginning of "sections/featured-collection.liquid"

Related Post