<commit_before><?php
defined('C5_EXECUTE') or die("Access Denied.");
$csm = $app->make('cs/helper/multilingual');
?>

<div class="store-product-filter-block" >

    <form class="<?= ($updateType == 'auto' ? 'store-product-filter-block-auto' : ''); ?>" <?= ($jumpAnchor ? 'id="filter-'. $bID .'"' : ''); ?>>

        <?php
        if (!empty($filterData)) {
            foreach ($filterData as $akhandle => $data) {
                $ak = $attributes[$akhandle];
                ?>
                <div class="form-group">

                    <h3 class="store-product-filter-block-option-title">
                    <?php if ($data['type'] == 'attr') { ?>
                        <?= h($csm->t($data['label'] ? $data['label'] : $ak->getAttributeKeyName(), 'productAttributeName', null, $ak->getAttributeKeyID())); ?>
                    <?php } elseif ($data['type'] == 'price') { ?>
                      <?= t($data['label'] ? $data['label']  : t('Price')); ?>
                    <?php } ?>
                    </h3>

                    <div class="store-product-filter-block-options">
                    <?php if ($data['type'] == 'attr') { ?>
                        <?php
                        $optiondata = $data['data'];


                        $matchingType = $attrFilterTypes[$akhandle]['matchingType'];
                        $invalidHiding = $attrFilterTypes[$akhandle]['invalidHiding'];

                    foreach ($optiondata as $option => $count) {
                        $checked = false;
                        $disabled = false;
                        $show = true;

                        if (isset($selectedAttributes[$akhandle]) && in_array($option, $selectedAttributes[$akhandle])) {
                            $checked = true;
                        } else {
                            if ($count == 0 && $matchingType == 'and') {
                                $disabled = true;
                                if ($invalidHiding == 'hide') {
                                    $show = false;
                                }
                            }
                        }
                        ?>

                        <?php if ($show) { ?><commit_msg>Don't show price heading on filter block if price range doesn't exist<commit_after><?php
defined('C5_EXECUTE') or die("Access Denied.");
$csm = $app->make('cs/helper/multilingual');
?>

<div class="store-product-filter-block" >

    <form class="<?= ($updateType == 'auto' ? 'store-product-filter-block-auto' : ''); ?>" <?= ($jumpAnchor ? 'id="filter-'. $bID .'"' : ''); ?>>

        <?php
        if (!empty($filterData)) {
            foreach ($filterData as $akhandle => $data) {
                $ak = $attributes[$akhandle];
                ?>
                <div class="form-group">

                    <h3 class="store-product-filter-block-option-title">
                    <?php if ($data['type'] == 'attr') { ?>
                        <?= h($csm->t($data['label'] ? $data['label'] : $ak->getAttributeKeyName(), 'productAttributeName', null, $ak->getAttributeKeyID())); ?>
                    <?php } elseif ($data['type'] == 'price' && $minPrice != $maxPrice) { ?>
                      <?= t($data['label'] ? $data['label']  : t('Price')); ?>
                    <?php } ?>
                    </h3>

                    <div class="store-product-filter-block-options">
                    <?php if ($data['type'] == 'attr') { ?>
                        <?php
                        $optiondata = $data['data'];


                        $matchingType = $attrFilterTypes[$akhandle]['matchingType'];
                        $invalidHiding = $attrFilterTypes[$akhandle]['invalidHiding'];

                    foreach ($optiondata as $option => $count) {
                        $checked = false;
                        $disabled = false;
                        $show = true;

                        if (isset($selectedAttributes[$akhandle]) && in_array($option, $selectedAttributes[$akhandle])) {
                            $checked = true;
                        } else {
                            if ($count == 0 && $matchingType == 'and') {
                                $disabled = true;
                                if ($invalidHiding == 'hide') {
                                    $show = false;
                                }
                            }
                        }
                        ?>

                        <?php if ($show) { ?>
{'fraction_non_alphanumeric': 0.168, 'fraction_numerical': 0.0017777777777777779, 'mean_word_length': 1.2550100200400802, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4215596', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1082, 'n_words': 205}