By Michael Stanek on Thursday, 28 July 2022
Posted in General Issues
Likes 0
Views 381
Votes 0
Hi team, we are struggling with the fact that if I as an admin create a subscription in Joomla admin, an e-mail is sent as if the user bought the subscription at our website. Our sales team is then confused and have no idea whether the payment is real or not. Is there any way to distinguish these e-mail notifications? I am ofc talking about custom programming for us. Anything: in-line CSS in the email, adding a class in the email, changing email title, not sending the e-mail at all.... anything. My ideas is to click a checkbox in Payplans admin to distinguish a real payment from a manual one. Thanks a lot.
Hey Micheal,

Let me know how you are assigning the subscription from the backend.
From the backend User tab, Assign plan functionality or from the backend Subscription page by creating a new subscription.

Update us with the response.
·
Thursday, 28 July 2022 17:56
·
0 Likes
·
0 Votes
·
0 Comments
·
HI Manisha, from the backend Orders > Subscriptions > NEW: I could not find the "User tab, Assign plan functionality" you are talking about so if there is any workaround, I would be glad if you showed me. Thanks a lot. Michael
·
Friday, 29 July 2022 16:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Micheal,

I am really sorry for the delayed response.

HI Manisha, from the backend Orders > Subscriptions > NEW: I could not find the "User tab, Assign plan functionality" you are talking about so if there is any workaround, I would be glad if you showed me. Thanks a lot. Michael
This is under user tab, backend >> User, on toolbar you will find the option for assign plan.

can you show me one example you created manually, so I'll check and let you know.

Thank you for understanding!
·
Monday, 01 August 2022 11:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Manisha, no need to apologize :-) I still can't find the "Assign plan" you are talking about. We added manualy this subscription: https://www.redmine-x.com/administrator/index.php?option=com_payplans&view=subscription&layout=form&id=7469
·
Tuesday, 02 August 2022 15:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Micheal,

Thank you for updating us on this.

Here is the Assign Plan option: https://monosnap.com/direct/S87zCTBFsQNdGQl7uFCtbv4NyCWjxM

We added manualy this subscription: https://www.redmine-x.com/administrator/index.php?option=com_payplans&view=subscription&layout=form&id=7469
Thank you for updating us on this. In that case, no payment id is attached to the payment attached with this subscription.
so the option is that when sending an email need to check whether the subscription has a payment app id or not if not then should not send the email. This is the only option to prevent subscription emails to send out.

Do you want this option for every notification rule created for email?

Looking forward to your response.
·
Tuesday, 02 August 2022 18:16
·
0 Likes
·
0 Votes
·
0 Comments
·
OK so you are saying that I have 2 options:

1) either assign plans in Payplans > Users or
2) have a piece of code implemented into the email template.

Right? In this case, just tell me the price in advance and I will decide. Thanks a lot.
·
Tuesday, 02 August 2022 19:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Micheal,

1) either assign plans in Payplans > Users or

no, i just want to how you are assigning plans.

2) have a piece of code implemented into the email template.

For this, need to add custom code into the email plugin, if a subscription is created from the backend then an email shouldn't be sent.

Let me know do you want this for all notification email rules created or for specific one email only.

Looking forward to your response.
·
Wednesday, 03 August 2022 10:53
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Manisha, a piece of code in the e-mail would be great. I want to stop the email "New Order Made" when a subscription is created from the backend. Thanks a lot. M
·
Tuesday, 09 August 2022 14:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Michael,

Earlier you said that you want this functionality for the notification rule and in your latest reply, you are saying that you want this for notify new order setting only.
see attached screenshot.

Looking forward to your response.
·
Tuesday, 09 August 2022 15:48
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Manisha, there's some misunderstanding going on. If you read my initial post description, this is what I want to achieve. Stop "New Order Emails" from coming if the subscription is created in the backend. If a website visitor buys a subscription, then I want the email to come as usual.
·
Tuesday, 09 August 2022 16:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Micheal,

Sorry for the misunderstanding.

To prevent sending "New Order Emails" when a subscription is created from the backend can be done with some custom code. For this, you need to do the changes mentioned below

Go to file root\administrator\components\com_payplans\includes\event\events\core.php, near line no. 374 find the below-mentioned code.

if (!$emails) {
return true;
}


Add the below-mentioned code after the above-mentioned line of code.

$order = $subscription->getOrder();
$payment = $order->getPayment();
$gateway = $payment->getApp();

if ($gateway->type == 'adminpay') {
return true;
}



Try this solution and see how it goes for you.

Thank you for understanding!
·
Tuesday, 09 August 2022 18:42
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks a lot.
·
Tuesday, 09 August 2022 19:52
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Micheal,

You are most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusion in the future. Please start a new thread if you have any other issues in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Wednesday, 10 August 2022 10:32
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post