NO EMAILS TRIGGERED IF PAYING OFFLINE

13 years 1 week ago #160955 by richirich
NO EMAILS TRIGGERED IF PAYING OFFLINE was created by richirich
Hello,
this is a very important and lacking feature of cbsubs and i am looking for a quick fix ASAP or i need to pay developer to build!?!?!

when paying by (offline payment) no emails are sent to admin nor to the client. I tried the following fixes and noe worked:
1-the email encubator! it will only go out once the admin pay the transaction in the basket
2-i tried to make the plan requires user confirmation and/or admin confirmation after payment. But nothing goes out!!!!
3-i tried all the possible variations between the default CB settings and the plan settings!!!

i simply want to notify the admin that a user registered with his info and a confirmation to the user about the transaction!
help ASAP Please, i am desperate here!
thanks

Please Log in to join the conversation.

13 years 1 week ago #161148 by richirich
Replied by richirich on topic Re: NO EMAILS TRIGGERED IF PAYING OFFLINE
You guys have not yet responded so i hired a developer to try and implement the email on payment offline but all related files are encrypted! how am i supposed to fix this issue now????

this is very frustrating!

Please Log in to join the conversation.

13 years 1 week ago - 13 years 1 week ago #161179 by richirich
Replied by richirich on topic Re: NO EMAILS TRIGGERED IF PAYING OFFLINE
here is the fix for emails not going out for offline payments:
insert that in your index.php on joomla root directory and after the first require calls:


// ########################################################################################
// HACK .... SEND EMAIL TO OFFLINE PAYCHECK PAYMENT TO COMPROFILER
// ########################################################################################
// MAGIK BEGIN
// ########################################################################################

if ((isset($_POST) && $_POST == 'com_comprofiler') && (isset($_POST) && $_POST == 'saveregisters')) {
// YES WE ARE IN :: NOW SAVE NEEDED INFORMATION TO A SECRET SAFE PLACE
$subscriptionParams = array();

$db =& JFactory::getDBO();

// GET PLAN NAME AND DESCRIPTION
$query = "SELECT * FROM #__cbsubs_plans WHERE id = ".$_POST[0][0];
$db->setQuery($query);
$row = $db->loadAssoc();
$subscriptionParams = $row;
$subscriptionParams = strip_tags($row);

// CHECK WHETHER IT'S A NEW USER OR LOGGEDIN USER
if (isset($_POST)) {
// LOGGED IN USER - GET USER INFORMATION
$query = "SELECT * FROM #__users WHERE id = ".$_POST;
$db->setQuery($query);
$row = $db->loadAssoc();

$subscriptionParams = array(
'Name'=>$row,
'Email'=>$row,
'Username'=>$row,
'isloggedin'=>true,
'planName'=> $row,
);

} else {
// NEW USER - SAVE PARAMETERS
$subscriptionParams = array(
'Name'=>$_POST.' '.$_POST,
'Email'=>$_POST,
'Password'=>$_POST,
'Username'=>$_POST,
'isloggedin'=>false,
'planName'=> $row,
);

$_SESSION["magik"] = serialize($subscriptionParams);
}
} else {

// STEP 2 SEND EMAIL BABY
if ((isset($_POST) && $_POST == 'showinstructions') && (isset($_GET) && $_GET == 'cbpaidsubscriptions')) {
if (isset($_SESSION)) {
$subscriptionParams = unserialize($_SESSION);

// SEND EMAIL TO SUBSCRIBER
$mailer =& JFactory::getMailer();

$config =& JFactory::getConfig();
$sender = array(
$config->getValue( 'config.mailfrom' ),
$config->getValue( 'config.fromname' ) );

$mailer->setSender($sender);

$recipient = $subscriptionParams;
$recipient2 = $config->getValue( 'config.mailfrom' );
$mailer->addRecipient($recipient);
$mailer->addRecipient($recipient2);


if (!$subscriptionParams) {
$details="
Your login details are:

Email: ".$subscriptionParams."

Username: ".$subscriptionParams."

password: ".$subscriptionParams."
";
} else {
$details="
your login information are:

//Email: ".$subscriptionParams."

Username: ".$subscriptionParams."
";
}

$body_ = "
Dear Mr. ".$subscriptionParams.",

Your registration details for '".$subscriptionParams."' have been saved, but your membership is not yet active.

".$details."0
..........rest of your message";

$mailer->setSubject('CPE Subscription');
$mailer->setBody($body_);

$send =& $mailer->Send();

unset($_SESSION);
}
}

}
// ########################################################################################
// MAGIK END
// ########################################################################################

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.199 seconds

Facebook Twitter LinkedIn