You may want to limit the number of items shown in an email to avoid making it too long when a large number of items are browsed or carted. However, you may also want to show a message to inform your customer that they have more items remaining than have been displayed.
Add a remaining items message
You can do this by making the below changes to your cart layout:
Go to Content > Cart Layout.
Create a new cart layout or edit an existing one.
Insert the following code at the top of the Edit the Cart Layout field:
{% set max_products_to_show = 3 %} {# Set maximum number of products to show in cart #}
{% set product_count = products|length %} {# Get total number of products in cart #}
{% set remaining_products = product_count - max_products_to_show %} {# Get number of remaining products #}Insert a limit filter to the product For loop:
{% for products in products|limit(max_products_to_show) %}
Insert this code where you'd like to show the remaining items message:
{% if remaining_products > 0 %}
and {{ remaining_products }} more item(s) in your cart.
{% endif %}