Skip to main content

Custom Field File - Hide if empty

More
12 years 1 month ago #168809 by maujbigo
-- HikaShop version -- : 2.3.2
-- Joomla version -- : 3.3

Hi Guys, I created a couple of custom fields of the type file for products which I will use to upload specs and pds.
The problem is that not all the products have pdf specs and pds available so I want the field to only appear if not empty.

I created an override for the show_block_custom_main.php I think I am doing something wrong.

I appreciate if you could help.

Thanks.

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

More
12 years 1 month ago #168826 by maujbigo
Hi I sorted it out.
I think there is an error in show_block_custom_main.php
it checks if the field is empty but then if it is igual 0
So it will show the field label either way.
I just changed it to
if (!empty ($value) || $value != 0)

And it is all sorted.
;)

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

Time to create page: 0.141 seconds
Powered by Kunena Forum