Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

sitebuilding11

Newbie
  
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

sitebuilding11's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Week One Done
  • One Month Later
  • One Year In
  • Conversation Starter

Recent Badges

0

Reputation

  1. на 4 итерации цикла, засунуть оставшиеся опции в dropdown Как это сделать в моем коде? Можете помочь? <div class="filters"> <div class="row"> <?php foreach ($filter_groups as $filter_group) { ?> <div class="opn col-sm-6" id="filter-group<?php echo $filter_group['filter_group_id']; ?>"> <a><?php echo $filter_group['name']; ?></a> <ul class="nav navmenu" > <div class="p-t" > <?php foreach ($filter_group['filter'] as $filter) { ?> <li class="filt_<?php echo $filter['filter_id']; ?> item" > <?php if (in_array($filter['filter_id'], $filter_category)) { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" checked="checked"> <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } else { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" > <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } ?> </li> <?php } ?> <li class="font-base dropdown"> <a role="button" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="p-0 border-n"> показать все <span class="caret"></span> </a> <ul class="dropdown-menu p-t-2"> </ul> </li> </div> </ul> </div> <?php } ?> </div> <!--div class="poisk2"> <button type="button" id="button-filter" class="btn btn-primary"><?php echo $button_filter; ?></button> </div--> </div> <script type="text/javascript"><!-- $('input[name^=\'filter\']').on('click', function() { filter = []; $('input[name^=\'filter\']:checked').each(function(element) { filter.push(this.value); }); location = '<?php echo $action; ?>&filter=' + filter.join(','); }); //--></script>
  2. Привет всем. Подскажите пожалуйста. Как в штатном фильтре (чуть изменен дизайн на горизонтальный) сделать чтобы некоторые опции были в выдающем блоке по клику пример тут https://sharonline.ru Там по кнопке показать все отрываются еще опции. Не пойму как сделать. у меня выходит только последняя опция https://sharboom.ru/ И еще вопрос. Как сделать чтобы при выборе еще одной опции фильтр это понимал. А то сейчас только одну опцию можно выбрать а при выборе другой пропадает первая. А надо чтобы были вместе пока не выключишь галочку. Движек 2.3 Мой фильтр выглядить вот так <div class="filters"> <div class="row"> <?php foreach ($filter_groups as $filter_group) { ?> <div class="opn col-sm-6" id="filter-group<?php echo $filter_group['filter_group_id']; ?>"> <a><?php echo $filter_group['name']; ?></a> <ul class="nav navmenu" > <div class="p-t" > <?php foreach ($filter_group['filter'] as $filter) { ?> <li class="filt_<?php echo $filter['filter_id']; ?> item" > <?php if (in_array($filter['filter_id'], $filter_category)) { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" checked="checked"> <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } else { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" > <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } ?> </li> <?php } ?> <li class="font-base dropdown"> <a role="button" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="p-0 border-n"> показать все <span class="caret"></span> </a> <ul class="dropdown-menu p-t-2"> <li class="filt_<?php echo $filter['filter_id']; ?> item" > <?php if (in_array($filter['filter_id'], $filter_category)) { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" checked="checked"> <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } else { ?> <input id="tag_<?php echo $filter['filter_id']; ?>" name="filter[]" value="<?php echo $filter['filter_id']; ?>" type="radio" data-checked="0" class="product-tags-j" > <label for="tag_<?php echo $filter['filter_id']; ?>" class="custom-checkbox-label"> <span class="custom-checkbox-inner"></span><?php echo $filter['name']; ?></label> <?php } ?> </li> </ul> </li> </div> </ul> </div> <?php } ?> </div> <!--div class="poisk2"> <button type="button" id="button-filter" class="btn btn-primary"><?php echo $button_filter; ?></button> </div--> </div> <script type="text/javascript"><!-- $('input[name^=\'filter\']').on('click', function() { filter = []; $('input[name^=\'filter\']:checked').each(function(element) { filter.push(this.value); }); location = '<?php echo $action; ?>&filter=' + filter.join(','); }); //--></script> Спасибо большое. Просто не пойму как сделать. Жду ответа с нетерпением
×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.