fiter display code

  • Posts: 129
  • Thank you received: 3
6 years 4 months ago #284121

-- 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:
    <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 | contact [at] yool.ir

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
6 years 4 months ago #284128

Hi,

You can do like that:

<?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.

  • Posts: 129
  • Thank you received: 3
6 years 4 months ago #284155

thanks nicolas.
worked


Joomla Developer | contact [at] yool.ir

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

Time to create page: 0.059 seconds
Powered by Kunena Forum