Odd or even | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Mohan_Dugganab
Mohan_DugganabAccepted solution
Employee
September 16, 2024

You can validate it on the following lines 

{% let arrayCount = count(profile.productsInCart) %} {%#if arrayCount % 2 = 0 %} even {%else if arrayCount % 2 = 1 %} odd {%/if%}

1 reply

Mohan_Dugganab
Mohan_DugganabAccepted solution
Employee
September 16, 2024

You can validate it on the following lines 

{% let arrayCount = count(profile.productsInCart) %} {%#if arrayCount % 2 = 0 %} even {%else if arrayCount % 2 = 1 %} odd {%/if%}
Translate