Skip to main content

hide option block

More
6 years 3 weeks ago #323969 by micker
hide option block was created by micker
-- HikaShop version -- : 4.3
-- Joomla version -- : 3.9.21
-- PHP version -- : 7.2

hello i have a litle problem ...
i have production caractéristique, in catregory view all is good
in product view it render options div
i have this code
Code:
<?php if($this->params->get('characteristic_display') != 'list') { $this->setLayout('show_block_characteristic'); echo '<div class="options">'.JText::_(OPTIONS_PRODUCT_TITLE); echo $this->loadTemplate().'</div>'; ?> <br /> <?php } ?>
how to check if characteristic is empty ?
regards

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

More
6 years 3 weeks ago #323979 by nicolas
Replied by nicolas on topic hide option block
Hi,

I'm sorry but I don't understand what you're trying to do.
We'll need more information on the situation to be able to help you.

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

More
6 years 3 weeks ago #323984 by micker
Replied by micker on topic hide option block
hello
if product doens't any characteristic the code bellow diplay
Code:
<div class="option"></div>
how to display nothing ?
regards

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

More
6 years 3 weeks ago - 6 years 3 weeks ago #323993 by Philip
Replied by Philip on topic hide option block
Hello,

Can you provide an Url link ? We aren't sure to understand the situation because in our mind the HikaShop's default behavior isn't to display anything at all in the product page if it haven't any Characteristics value.
On your side, you can check that you don't have any override on your product/show_default or product/show_block_characteristic
Awaiting elements from you to be able to better understand the situation.

Regards
Last edit: 6 years 3 weeks ago by Philip.

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

More
6 years 2 weeks ago #324017 by micker
Replied by micker on topic hide option block
here the category view , no option direct cart link
This message contains confidential information

and if you open product view
This message contains confidential information

it display "vos options"
the code above is the view

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

More
6 years 2 weeks ago #324020 by nicolas
Replied by nicolas on topic hide option block
Hi,

You want to add an additional check:
Code:
if(!empty($this->element->characteristics)) { .... }

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

More
6 years 2 weeks ago #324045 by micker
Replied by micker on topic hide option block
Merci c'est parfait !

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

Time to create page: 0.207 seconds
Powered by Kunena Forum