Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem: Email Template Variables
#1
This is something that as I remember has never really worked that well, but until getting everything upgraded today I hadn't really cared too much about. Now, it's driving me nuts... and it gets better.
  • 1. trying to get the contacts first name, which according to coreBOS should be $contacts-firstname$ doesn't actually insert the name but just displays it as it's shown here.

    2. The Customer Portal notification message gets sent, but its displaying raw HTML in the message. I've recreated the template multiple times but the results are the same.

Any ideas?
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#2
Ugh!

Now the Customer Portal message isn't being sent at all. All I did was delete the template and recreate it calling exactly the same thing it was called originally.

damnit... not having a good day. <!-- sConfusedhock: --><img src="{SMILIES_PATH}/icon_eek.gif" alt="Confusedhock:" title="Shocked" /><!-- sConfusedhock: -->
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#3
Update:

Salutation variable $contacts-firstname$ is working correctly but still no Customer Portal Notification message being sent.

2014-11-23 17:21
But wait! there's more... I just installed a fresh, vanilla copy of coreBOS5.5 on my web server and tested the customer portal notification. Core sent the message but it was in raw HTML. Still, I don't see anything different from the vanilla install to my production install that isn't sending the notification.
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#4
Your first pitfall is typical, it happens a lot: the way that coreBOS knows which email template it has to send out is by looking at the notification schecduler. There you will see a record for "Start of Support" (or something like that). It is entry 5, when you click on the settings for that record you will see that you can pick the email template to send out. So when you delete the standard one and create a new one, you also have to edit record 5 and pick the correct email template.

As to not merging all the variables, I have to admit that I hadn't noticed that wasn't woring. I looked at the function that does that and it was only merging a subset of the Contact's fields. I have just uploaded a change to fix that. Update your code.

Finally, I do not know why you aren't getting the email in HTML. Please let me know if that is still happening and I will try to reproduce locally.
Joe
TSolucio
Reply
#5
Hi Joe,

Thank you... you've saved my sanity. It's sending the notifications again, but they're coming out in raw HTML. snippet below

Code:
<table style="border: 1px solid #003; font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif; padding: 20px 20px 20px 20px;" width="600"> <tbody> <tr> <th style="background-color:#666; font-size: 18px; font-style: bold; height: 60px; vertical-align: middle; color: #FFF;">CISS Customer Portal Information</th> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td> <p><strong>Hello $contacts-firstname$</strong></p> <p>Thank you very much for subscribing to the CISS Customer Portal.<br /> Here is your self service portal login details:</p> <div align="center"> <table style="border: 1px solid #000; background-color: #CCC; font-family: 'Courier New', Courier, monospace; font-size: 10pt; padding: 40px 40px 40px 40px;" width="400"> <tbody> <tr> <td> <p>User ID: <strong>mweaver@compinfosystems.com</strong></p>

in regards to updating my code... it's been somewhat of a long day and I'm still finding my way around the updater and how to use it. How should I go about updating the code to catch the changes you've posted?

thank you,
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#6
I just tested the email and you are right, for some reason it was being sent wrong.
I have just uploaded a fix for that along with another change that was needed to get the contact fields working correctly.

As to updating, once you are on the coreBOS updater band wagon, you have to put your code under git revision control, that way git will take care of syncing the code changes, what I do is this:

- git pull
- fix any conflicts
- log in as admin
- corebos updater: load changes
- corebos updater: apply changes

that is it, forever

git has a learning curve, but it is WELL worth the effort!
Joe
TSolucio
Reply
#7
Hi Joe,

My apologies for being so thick-headed but what is git trying to tell me here?

Code:
]$ git remote add corebos https://github.com/tsolucio/corebos
fatal: Not a git repository (or any parent up to mount point /var)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I seem to be having problems adding a repository for git to pull and merge from.
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#8
to add a remote you need to have a git repository to add it to. the message is saying that your current directory is not a git repository

the idea would be:

- you get a copy of the repository: git clone <!-- m --><a class="postlink" href="http://github.com/tsolucio/corebos">http://github.com/tsolucio/corebos</a><!-- m -->
- that will create a directory called corebos that is versioned

Since I am counting that you have a corebos installed already then try copying the .git directory from the clone you just made into the directory you have corebos working now. Then go into that directory and execute

git status

that should give you a positive response
Joe
TSolucio
Reply
#9
Awesome! everything is done and working correctly. I had to pull down the contacts.php edits manually from gihub, but its all working now. Not sure why but its working.

I have another thing but in regards to Trouble-Ticket notifications but I'll make a new post for that.
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply
#10
Not sure why because I haven't changed anything, but the email template variables stopped working again.

this is what is being displayed:

Hello $contacts-firstname$

Thank you very much for choosing
Mark

[i]If I could work while on horseback that's where I'd be doing it. There's nothing like riding... Gives new meaning to the phrase, ride to live... live to ride.[/i]
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)