*

Ivanko

  • *****
  • 391 posts
Hide Custom fields in item.php
« on: January 17, 2018, 05:09:30 PM »
Hi.

How to hide unchecked custom fields  in item.php instead of showing red cross...?

thanks )

Marked as best answer by safeacid on January 17, 2018, 06:16:41 PM
*

c4

  • **
  • 6 posts
Re: Hide Custom fields in item.php
« Reply #1 on: January 17, 2018, 05:52:56 PM »
as far as I remember it will be like this:

In item.php replace

<?php while ( osc_has_item_meta() ) { ?>
<?php if(osc_item_meta_value()!='') { ?>



with



<?php while ( osc_has_item_meta() ) {

$show_custom = (osc_item_meta_value() == '' || strpos(osc_item_meta_value(), 'cross.png') ? 0 : 1);
if ($show_custom) { ?>

*

Ivanko

  • *****
  • 391 posts
Re: Hide Custom fields in item.php
« Reply #2 on: January 17, 2018, 06:17:27 PM »
ok, C4 cool, thanks
I become too lazzy, damn