Post by Vindojeens » Sun Nov 20, 2016 12:55 am

Hi there, can somebody please help me.
I have setup a page:

http://aspolo.com/index.php?route=produ ... order=DESC

Everything looks like I wanted it, the only problem is, as I have to many filters (whicht I need), the left menu has become too long.
A solution would be to make an accordion-type menu like here:

http://estore-de.pandora.net/de_DE/neuh ... ostion=top

Though I haven't succeeded in doing so. I know there are several modules that do so, but I don't really can spend something right now till I'm not sure that I can setup the site in a way I really need.

Can someone please help me? This is the code of the default filter theme (filter.tpl):

Code: Select all

<div class="panel panel-default">
  <div class="panel-heading"><?php echo $heading_title; ?></div>
  <div class="list-group">
    <?php foreach ($filter_groups as $filter_group) { ?>
    <a class="list-group-item"><?php echo $filter_group['name']; ?></a>
    <div class="list-group-item">
      <div id="filter-group<?php echo $filter_group['filter_group_id']; ?>">
        <?php foreach ($filter_group['filter'] as $filter) { ?>
        <div class="checkbox">
          <label>
            <?php if (in_array($filter['filter_id'], $filter_category)) { ?>
            <input type="checkbox" name="filter[]" value="<?php echo $filter['filter_id']; ?>" checked="checked" />
            <?php echo $filter['name']; ?>
            <?php } else { ?>
            <input type="checkbox" name="filter[]" value="<?php echo $filter['filter_id']; ?>" />
            <?php echo $filter['name']; ?>
            <?php } ?>
          </label>
        </div>
        <?php } ?>
      </div>
    </div>
    <?php } ?>
  </div>
  <div class="panel-footer text-right">
    <button type="button" id="button-filter" class="btn btn-primary"><?php echo $button_filter; ?></button>
  </div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
	filter = [];

	$('input[name^=\'filter\']:checked').each(function(element) {
		filter.push(this.value);
	});

	location = '<?php echo $action; ?>&filter=' + filter.join(',');
});
//--></script>

Help is really appreciated!!!

Newbie

Posts

Joined
Sun Nov 20, 2016 12:49 am
Who is online

Users browsing this forum: No registered users and 30 guests