Dirty Butter Posted December 3, 2013 Share Posted December 3, 2013 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> Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 3, 2013 Share Posted December 3, 2013 {if !empty($customer.customer_notes)} <a href="{$STORE_URL}/admin.php?_g=customers&sort%5Bregistered%5D=DESC&action=edit&customer_id={$customer.customer_id}#customer_notes">Notes</a> {/if} Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted December 4, 2013 Author Share Posted December 4, 2013 So !empty means not empty? Good to know. Thanks! That gives me an easy way to note when I've contacted a person who registered, but has not purchased anything, or had problems ordering. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.