The SimpleInvoices forum has moved to Google Plus - this forum is now read-only
Make email klicking on email posible
  • dickidicki November 2012

    It seems that SI is great for me.
    I am discovering it now.
    One of the questions is How i can mail from within SI to my customers?

    It would be good enough for me when the email adres in "Manage Customers" --> "View customer" is an hyperlink. How could i change this to an hyperlink?
    What file is involved with this form?

    It is also enough when their is an envelop in front of a customer in the "Manage Customers" tab what i can use for sending an mail to my custumer.


    Thanks for all the good work!

  • ephetersonepheterson November 2012

    Hey, very easy. I've spelled it out in this pastebin:
    http://pastebin.com/3P6KahPc

    You can also add a subject or message body as described here:
    http://zoomquiet.org/res/scrapbook/ZqSKM/data/20100419224556/

  • dickidicki November 2012

    Your are GREAT!!! and fast, the options i understand for html link's but i did not know what file to edit. I am not familiar with the structure of SI yet.

    Now i did the trick and i will thank you very much.

    Greetings from Holland

  • ephetersonepheterson November 2012

    :-D

  • dickidicki November 2012

    Can you tell me what file is involved for second part of the question?:

    It is also enough when their is an envelop in front of a customer in the "Manage Customers" tab what i can use for sending an mail to my custumer.

    As far as i can see it is the /si/modules/customers/manage.js.php ?
    but i have too figure it out for sure....
    thanks anyway

  • ephetersonepheterson November 2012

    Hey, unfortunately that's not as easy. To add the email icon to the action menu, we go to /modules/customers/xml.php and add the following line towards the bottom, where [] is <>

    [a href='http://www.google.com'][img src='images/common/mail-message-new.png' class='action' /][/a]

    The tricky part is getting the email for the customer on each row to print to HTML. I have no idea where to get it from as the only valid fields which appear on the page are:

    $validFields = array('CID', 'name', 'customer_total','owing','enabled');

    Maybe do an extra SQL query and pull it in? Have fun!

  • ephetersonepheterson November 2012

    Oh, I'm good. Replace /modules/customers/xml.php with this http://pastebin.com/WUGK1KCw

    I did an extra SQL query:
    -----
    SELECT
    email AS em
    FROM
    ".TB_PREFIX."customers
    WHERE
    id = CID ) as email
    -----

    Which gave meaning to $row['email'], which is what I used in the mailto.

Categories

Tagged