Jump to content

Need an additional Admin column to show conditionally


Dirty Butter

Recommended Posts

I've added a customer_notes column to the _customers table, and I have added the appropriate column in customers.index.php.
 
The code below does work, but I would much prefer that the Notes link ONLY SHOW for those customers who actually HAVE something in Notes.
 
What do I need to add, so that the Notes link only shows if customer_notes is NOT NULL?
 

<td align="center">
			<a href="{$customer.edit}" title="{$LANG.common.edit}"><img src="{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/images/edit.png" alt="{$LANG.common.edit}" /></a>
			<a href="{$customer.delete}" class="delete" title="{$LANG.notification.confirm_delete}"><img src="{$SKIN_VARS.admin_folder}/skins/{$SKIN_VARS.skin_folder}/images/delete.png" alt="{$LANG.common.delete}" /></a>
		  </td>
<td><a href="{$STORE_URL}/admin.php?_g=customers&sort%5Bregistered%5D=DESC&action=edit&customer_id={$customer.customer_id}#customer_notes">Notes</a></td>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...