PDA

View Full Version : Concat statement not showing in email?


cassembers
08-11-2008, 05:38 PM
Within a form I have one field (classinfo) that uses a concat statement
classnum, ' ', title, ' (', price, ')'
Well... it works everywhere fine except the email template. When the email gets sent out, all that appears is the classnum.
I figured in the email template if I did the field as normal {classinfo} it would appear as it should using the concat statement. Apparently not?
Any ideas?? I need the classnum and title listed in the email.
Thanks guys..

cheesegrits
08-12-2008, 04:49 PM
This is a known issue, we're working on it.

-- hugh

nk111
08-21-2008, 01:32 PM
I'd be interested in a solution for this too. In the meantime.. is there any workaround for this problem?

nico

update: maybe this is one...

in my form the concat field is a dropdown so I created a new hidden element and defined 2 js actions:
- one for the hidden field which fires on load and sets the value of the hidden field to the selected text from the dropdown
- and one for the dropdown which sets the value of the hiddenfield to the selected text at the onChange event

now I could use {name_of_hidden_field) in email templates to display the concat value...

cassembers
08-26-2008, 01:09 PM
in my form the concat field is a dropdown so I created a new hidden element and defined 2 js actions:
... I don't know much (alright ANYTHING) about js actions, so you lost me on this one.. :( my concat field is dropdown as well, but I don't have the faintest clue where to start with the coding..


This is a known issue, we're working on it.
-- hugh
Thanks Hugh, please keep us posted!

cheesegrits
08-26-2008, 07:51 PM
Seeing as how you said please, I had a hack at this. Latest SVN should use labels instead of keys for database dropdowns in receipt emails.

-- hugh

cassembers
08-27-2008, 09:35 PM
Thank you Hugh! As always, you rock ;)

cheesegrits
08-28-2008, 06:40 AM
Thank you for the kind words.

More concrete appreciation in the form of donations towards the "Pay Hugh's Rent" fund are also always welcome.

-- hugh

cassembers
08-28-2008, 01:33 PM
Done!
You guys have helped me more than enough over the past months. I know it's not much, but thank you anyway for all your help!! I don't know where I'd be without this component.. I use it on every website I build.
Again - YOU ROCK! :cool:

cassembers
08-28-2008, 03:30 PM
Further to this.. I updated with the newest SVN, and now my pre-filters do not work.

I have a table "jos_NEWregistrations" joined with "jos_classes"
Prefilter is: jos_classes.newinstructor EQUALS global $my; return $my->id; applied to everyone
I have tried to activate the eval, but whenever I apply, it does not stick. I'm pretty sure this is why it isn't working, the page comes back blank. When I remove the filter the table appears fine. Maybe I'm wrong?
I tried it in IE and FF.... now several of my important pages aren't working...
HELP!!! :eek:

rob
08-28-2008, 10:01 PM
hi

I'll take a look at this for you now

Rob

rob
08-28-2008, 10:29 PM
try updating from the SVN now?

cassembers
08-29-2008, 01:08 PM
Hi Rob. The button sticks now (thank you!), but nothing has changed on the front-end. The table is still blank. I thought I may have done something wrong, but I've tried everything I can think of. Any ideas?

As I said before:
I have a table "jos_NEWregistrations" inner-joined with "jos_classes"
Prefilter is: jos_classes.newinstructor EQUALS global $my; return $my->id; (Eval is on) applied to everyone

It used to work, now the table is blank.

If I add {}'s and change EQUALS to CONTAINS it returns all the teachers.. which leads me to believe it is a problem with my global $my; return $my->id; I tried removing the {}'s around it as I originally had it, but then the page is blank again...

I'm so confused LOL

cheesegrits
08-29-2008, 05:55 PM
This is one of those "is there gas in the tank?" questions, but ... are you sure the user you are logged in as has matching 'newinstructor' entries in the jos_classes tables?

And .. just give the actual underlying table a quick look in phpMyAdmin, make sure the data you would expect is in newinstructor, make sure we haven't borked something else up.

-- hugh

cassembers
08-29-2008, 06:01 PM
Hugh,

Yes the user I am logging in as has several classes with people that have applied... there should be a dozen or so records.. Even though the classes have passed, there is no time pre-filter set. So it should bring back all the records regardless.

And yes, newinstructor lists the userid of the instructor running the class (just triple checked ;) )


:/

cheesegrits
08-29-2008, 06:22 PM
Hmmmm. It's tough to go much further with this one without Laying On Of Hands on your server ... but we're having to be a lot stricter with ourselves about doing this only for Subcribers. Fabrik usage has picked up a lot this year, and (as you can tell from the New Posts page) we're busier than the proverbial one legged man in an ass kicking contest.

I hate doing this, but if you would consider subscribing, I can move this thread into Subscriber Support, and you can PM me a backend login.

Six months ago I wouldn't have dreamed of asking you to do this, but the reality is, we're killing ourselves spending a disproportionate amount of time providing free support, and Rob and I both need to put food on the table.

-- hugh

cassembers
09-02-2008, 02:53 PM
Unfortunately as I just donated to you guys, I can't afford anymore expenses at this time.

So I guess I'll leave it at this...

I've tried everything, and at this point I've concluded there is a specific error with the global $my; return $my->id;
It is the ONLY thing that doesn't work. I have tried it with the following changes:
{global $my; return $my->id;}
'{global $my; return $my->id;}'
{'global $my; return $my->id;'}
global $my return $my->id
$my->idIf I replace the code with the actual id, it works fine.

I just don't get it, as it worked before I upgraded from the SVN. Even if I undo the updates it still doesn't work anymore.
For now I have removed the filter and the instructors will have to sort through the applications to find their groups of classes.

Thanks for your help anyways.

cheesegrits
09-02-2008, 04:12 PM
Oh, go on ... PM me your details, I'll give it a go.

-- hugh

cheesegrits
09-02-2008, 04:15 PM
PS, try {$my->id}, no eval.

-- hugh

cassembers
09-02-2008, 08:00 PM
That worked. Of course, the only one I don't try.
Thank you Hugh!

cheesegrits
09-02-2008, 08:37 PM
We thought {my->id} without the dollar sign should have worked, but obviously not.

And I have no idea why the traditional "global $my; return $my->id;" doesn't work. You did set it to eval when you tried the raw PHP, right?

This is F! 1.0.x on J! 1.0.x, right? In J!1.5, $my no longer exists.

-- hugh

cassembers
09-02-2008, 09:01 PM
Correct - I am using Fabrik 1.0.6 (latest SVN) and Joomla 1.0.15
Yes, I tried with, without everything with the Eval.. I don't know either.. I was banging my head against the wall for 5 days over this LOL
I'm glad it's over PHEW! :cool:

cheesegrits
09-02-2008, 09:15 PM
I'm intrigued enough that I'd like to take a look, see why the eval'ed method won't work.

Can you PM me a login? The last one you sent me no longer has access.

-- hugh

cassembers
09-02-2008, 10:22 PM
Done! I have PM'd you the appropriate information.
Let me know if you need anything further or what you find in my mess :-[

cassembers
09-05-2008, 01:12 PM
I'm not sure if you've looked at this yet..... but with this now working, it isn't working LOL...
It appears fine, but when you try and edit the record, it doesn't take.
If I remove the join to classes, it works - so there is a problem with my join I guess, but I have no clue.

*FRUSTRATED*

cheesegrits
09-05-2008, 05:23 PM
I'll try and find time to look at this today. If I don't get round to it, it'll be Monday before I can do it, as I'm out of town this weekend.

-- hugh

cassembers
09-17-2008, 02:12 PM
*friendly bump*

cheesegrits
09-17-2008, 04:56 PM
See my PM response, I'm going to need you on IM to work thru this one.

-- hugh