Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {$count = $category.products_count}
- {$is_first_form = $count % 10 == 1 && $count % 100 != 11}
- {$is_second_form = in_array($count % 10, [2, 3, 4]) && !in_array($count % 100, [12, 13, 14])}
- {if $is_first_form}
- {$category.fields[2].value}
- {elseif $is_second_form}
- {$category.fields[3].value}
- {else}
- {$category.fields[4].value}
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement