Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

send a mail after saving !! 04 Jul 2013 17:47 #7868

if I send mails, but they can give me a hint on how to get the data you saved to send??
I've tried using Jdom like the view but does not work says: Body empty data
Any idea?
$body = $result['nombre_propiedad'];
$body =<?php echo JDom::_('html.fly', array(
						'dataKey' => 'nombre_propiedad',
						'dataObject' => $row,
						'route' => array('view' => 'propiedadesitem','layout' => 'propiedadesitem','cid[]' => $row->id)
					));?>

Please Log in or Create an account to join the conversation.

send a mail after saving !! 04 Jul 2013 19:47 #7872

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
I can see an error in your code :
Remove
<?php echo
?>
$body = JDom::_(
...
);

Did you got it to select and treat your datas ?
Coding is now a piece of cake
The following user(s) said Thank You: pinochet

Please Log in or Create an account to join the conversation.

send a mail after saving !! 04 Jul 2013 21:58 #7876

Empy says Body again, that might be??? please help me, I'm almost done with the hair on my head

Please Log in or Create an account to join the conversation.

send a mail after saving !! 19 Aug 2013 22:00 #10853

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Did you got it ?
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

send a mail after saving !! 19 Aug 2013 22:07 #10857

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
There is a difference between two situations :
Is it new data, or data already in database?
If it is new data, then use something like
$body. =$data['the_field '] 
If it's data already stored, use jDom or use a query to get the data you need
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.

Last edit: by VeCrea.

send a mail after saving !! 19 Aug 2013 22:15 #10858

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
@VeCrea : not clear.

This post is starting to be a mess. I do not understand the source of anybody.

@pinochet :
I can see you are struggling.
Don't worry. This functionality will pop up soon I think.

If you can wait a little bit, I will integrate it in a very simple mode :
- When a new item is created NOT by a user without ACL 'core.edit.state'... So publish = 0
- Mean that the item is waiting for approval => sending mail to system admin

It will not integrate more features for the moment. In order to keep it simple.
Let me just finish to answer all the missed topics (soon finished)
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: send a mail after saving !! 11 Jul 2015 22:24 #13321

Any idea how far away you are from this dev being available? :) Just checking.

Please Log in or Create an account to join the conversation.

Re: send a mail after saving !! 11 Jul 2015 22:39 #13322

  • VeCrea
  • VeCrea's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Absolute JCook fan
  • Posts: 473
  • Thank you received: 100
What do you need? Explain and I'll help.

Please Log in or Create an account to join the conversation.

Re: send a mail after saving !! 12 Jul 2015 00:47 #13323

Ok here we go. :)

I have a table and view called moderators in my component which I can load users into that are in the end the people who get emailed anytime an update is done. So basically I want to be able to place a call to a mail script from anyone of my views when an event is submitted to the list of users in the moderator table.

Hope that makes sense?

Please Log in or Create an account to join the conversation.

Re: send a mail after saving !! 12 Jul 2015 18:16 #13330

Yeah,

Fork the controller for the item from the table you want to mail updates, lets call the table "events".
So, create in your fork folder a subfolder "controllers". Copy the event.php (not events.php!) from the _fork/controllers folder which is generated.

Now, open the admin/controllers/event.php and copy/paste the function "save" into your forked event.php. When you want to have a mail when an event is inserted or another data manipulation, just copy those functions too (add/delete).

In your forked event.php, create a function MailModerators or whatever you need and create the code to mail the moderators in there (assuming you know how)
Then, call that function in the save function just after $result = parent::save();

Similar to the add() function.
The following user(s) said Thank You: jonathanbell

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Time to create page: 0.071 seconds

I've evaluated lots of other Joomla Component Dev tools such as Shell Manager (J)enesis Danny's Joomla! 1.5 MVC Component Code Generator Marco's Component Maker and I must admit that I love what I see on your site! Lots of potential... Otherwise Great Job and keep up the good work!!!
Clifton (forum)

Get Started