Suppressing Specifications tab when using Tabular

  • Posts: 62
  • Thank you received: 0
11 years 3 days ago #167366

-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3.3

Hi,

I want to keep using the TABULAR view for product detail pages. However so that I can change the product unit I have had to implement a custom field as suggested by the FAQ in this thread hikashop.com/forum/product-category-disp...-entered.html#167364 .

Now what I want to do is this:

a) Suppress specifications tab in its entirety
b) Suppress specifications tab if it has other fields that are not the one I had to declare for the custom product unit

Thanks in advance.

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

  • Posts: 12953
  • Thank you received: 1778
11 years 2 days ago #167390

Hello,
Using that kind of CSS code will probably do the job :

#hikashop_product_bottom_part #hikashop_show_tabular_specification_li {
display: none;
}
But note that you can also directly edit the code of the "show_tabular" file of the "product" view of your front-end template.

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

  • Posts: 62
  • Thank you received: 0
10 years 11 months ago #168246

Hi Mohamed,

Thanks for the CSS snippet. Any chance you have some PHP code handy to satisfy b) from my original post?

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

  • Posts: 12953
  • Thank you received: 1778
10 years 11 months ago #168286

Hi,
That won't be that easy to do and some developer skills will be required, you'll just have display or not that code :

    <?php if($hide_specs == 0){ ?>
    <div class="hikashop_tabs_content" id="hikashop_show_tabular_specification">
    <?php
      //LAYOUT show_block_dimensions
      $this->setLayout('show_block_dimensions');
      echo $this->loadTemplate();
      if(!empty($this->fields)){
        //LAYOUT show_block_custom_main
        $this->setLayout('show_block_custom_main');
        echo $this->loadTemplate();
      }
    ?>
    </div>
    <?php }
So the solution will be to use something like this (note that you"ll have to replace the "$MYCUSTOMFIELDVALUE" variable)
    <?php if(!empty($MYCUSTOMFIELDVALUE) && $hide_specs == 0){ ?>
    <div class="hikashop_tabs_content" id="hikashop_show_tabular_specification">
    <?php
      //LAYOUT show_block_dimensions
      $this->setLayout('show_block_dimensions');
      echo $this->loadTemplate();
      if(!empty($this->fields)){
        //LAYOUT show_block_custom_main
        $this->setLayout('show_block_custom_main');
        echo $this->loadTemplate();
      }
    ?>
    </div>
    <?php }

Last edit: 10 years 11 months ago by Mohamed Thelji.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum