Skip to main content

fiter display code

More
8 years 9 months ago #284121 by aminweb
fiter display code was created by aminweb
-- HikaShop version -- : 3.2.1

hi,
I want when display filter = yes (menu hikashop option) in view->product->listing.php
hikashop_products_listing div col-md-9
and when display filter = no (menu hikashop option) in view->product->listing.php
hikashop_products_listing div col-md-12

now please help me , what is short code display filter for use php if?
I insert below code but dont work:
Code:
<div class="<?php if(!$filterActivated && empty($this->rows) && $this->params->get('module') != 'mod_hikashop_filter'){echo 'col-md-9 hikashop_products_listing';}else{echo 'col-md-12 hikashop_products_listing';}?>">

Joomla Developer | am.ebrahimzadeh[at]gmail.com

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #284128 by nicolas
Replied by nicolas on topic fiter display code
Hi,

You can do like that:
Code:
<?php $display_filters = (int)$this->params->get('display_filters', -1); if($display_filters == -1) { $config =& hikashop_config(); $display_filters = (int)$config->get('show_filters'); } $div_class = 'col-md-12'; if($display_filters){ $div_class = 'col-md-9'; } ?> <div class="<?php echo $div_class; ?> hikashop_products_listing"> .... </div>
The following user(s) said Thank You: aminweb

Please Log in or Create an account to join the conversation.

More
8 years 9 months ago #284155 by aminweb
Replied by aminweb on topic fiter display code
thanks nicolas.
worked

Joomla Developer | am.ebrahimzadeh[at]gmail.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.208 seconds
Powered by Kunena Forum