Sorry if my methods are a mess, I'm terrible at programming.
I'm trying to add a handful of custom field values as tooltips on attributes. It's going fine except I'm struggling to hide the tooltip if the specific custom field is blank.
How I'm doing it now is I have custom fields like: 1_attr_tip, 2_attr_tip, 3_attr_tip, etc.
...and then on the attribute template I'm using the attribute index + '_attr_tip' to show the correct number tip for the matching attribute. Like this:
<span class="tooltiptext"><mvt:item name="customfields" param="Read_Product_Code( g.Product_Code, l.settings:attribute:index $ '_attr_tip' )" />&mvt:customfields;</span>
But now I wanna check if the custom field is null, and I have no idea how to use that read custom field function WITH the concatenation that I'm using to get the custom field's name . . . I have made my own dumb problem I tried to put it in a variable but I was having the same problem.
tl;dr how do i use the attribute index + a string to get the custom field's code/contents and then use the contents in a conditional?
Thanks!
I'm trying to add a handful of custom field values as tooltips on attributes. It's going fine except I'm struggling to hide the tooltip if the specific custom field is blank.
How I'm doing it now is I have custom fields like: 1_attr_tip, 2_attr_tip, 3_attr_tip, etc.
...and then on the attribute template I'm using the attribute index + '_attr_tip' to show the correct number tip for the matching attribute. Like this:
<span class="tooltiptext"><mvt:item name="customfields" param="Read_Product_Code( g.Product_Code, l.settings:attribute:index $ '_attr_tip' )" />&mvt:customfields;</span>
But now I wanna check if the custom field is null, and I have no idea how to use that read custom field function WITH the concatenation that I'm using to get the custom field's name . . . I have made my own dumb problem I tried to put it in a variable but I was having the same problem.
tl;dr how do i use the attribute index + a string to get the custom field's code/contents and then use the contents in a conditional?
Thanks!
Comment