Osclass Support Forums

Osclass plugin support => Attributes Plugins => Topic started by: developGr on December 06, 2020, 07:52:22 PM

Title: The "atr-name" its not hidden if the attribute its not fill up!
Post by: developGr on December 06, 2020, 07:52:22 PM
Problem:
When i set this code: <?php if(function_exists('atr_show_attribute')) { echo atr_show_attribute(9); } ?>
to the item.php to show an attribute in different position, if the attribute its not fill up by the user then i still get the "atr-name" of the attribute.

With the normal way the "atr-name" its hidden:
The "atr-name" of the attribute its auto hidden in the item.php with the normal way showing up the attribute by selecting the "Add to Item" from the "Configure Attributes Plugin" page.
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: MB Themes on December 06, 2020, 08:00:51 PM
@developerGr
Will check it.
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: developGr on December 06, 2020, 08:05:03 PM
Will wait for the solution!
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: MB Themes on December 07, 2020, 07:36:43 AM
@developGr
In functions.php of plugin find following code:
Code: [Select]
  if($type == 'TEXT' || $type == 'TEXTAREA' || $type == 'PHONE' || $type == 'EMAIL' || $type == 'URL' || $type == 'DATE' || $type == 'DATERANGE' || $type == 'NUMBER') {
    //$value_row = ModelATR::newInstance()->getItemAttributeValues($item_id, $a['pk_i_id']);
    $value_row = $value_row_all[$a['pk_i_id']];

Bellow this code add:
Code: [Select]
    if(trim($value_row['s_value']) == '') {
      return false;
    }
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: developGr on December 07, 2020, 03:13:31 PM
now it works!

you will include that code in the next update of the plugin?
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: Tango on December 21, 2020, 01:03:43 AM
you will include that code in the next update of the plugin?

Yes, any chance of getting a new version of the plugin, containing the fix?

Thanks!
Title: Re: The "atr-name" its not hidden if the attribute its not fill up!
Post by: MB Themes on December 21, 2020, 11:13:51 AM
@Tango
Updated.