Joomla v1.6 - How & Where to set Custom Success Messages in Controller? - joomla

In Joomla! 1.6 Contact Form submission, I want to set a custom successful message, so that the front-end user can view that message after he submits the contact form.
There are 2 problems basically:-
I am using the default Contact Form component (com_contact), as provided by the Joomla! v1.6. But I am unable to find the proper area from where the contact form is submitted & the mail is being sent. So I need to know the page name & the method name of this component, firing the mail from the front-end.
How to set the custom messages (just like in the administrator panel) in the particular method of contact form component, to let the front-end user know that he has been able to successfully send the mail to the concerned staff?
Thanks in advance to all who can help.

To show Message
use $this->setMessage(JText::_('COM_YOURCOMPONENT_MESSAGE')); if you are in controller.
or use
JFactory::getApplication()->enqueueMessage(JText::_('COM_YOURCOMPONENT_MESSAGE'));
And Email is sent through JoomlaRoot / components / com_contact / controllers / contact.php
find the function submit(), the mailing code is written here.

Related

How to handle Stripe payment failure via AJAX, with standard page load for success? (using Laravel backend)

I've got a long and fairly complex form for a booking system that a user fills in, then pays using Stripe Checkout. I'm trying to figure out the best solution to both handle payment failure easily (so submitting form over AJAX so I don't have to try and regenerate the whole booking form with all the data the user's entered), whilst also handling payment success gracefully (so with a new page showing a booking summary and a different URL so if user clicks reload button in their browser it doesn't just take them back to the search results and booking form again)
I'm using a mixture of Laravel 5.4 and JS/JQuery to generate the booking form on the front end, and after Stripe Checkout (I'm using their standard simple integration pop up) it submits all the form + Stripe token etc back to a POST route in my Laravel backend. In my controller, I then try and charge the credit card using standard Stripe API and process the booking details into my database, and then return a Laravel view from a Blade template thus giving the user a different page and URL. As mentioned I want to switch the form submission to AJAX so payment failure can be handled easily (i.e. their big filled in form doesn't disappear, and just an alert pops up to user so they can try and enter a new card into the Stripe Checkout). That bit's fine, I'll just use this: https://stackoverflow.com/a/34099169/4059141 but then in payment succeeds I basically want the same behaviour as if I'd done a regular form POST, so the new page being displayed with a new URL.
I can generate and pass back the rendered HTML from the blade template over AJAX no problem, but that leaves the original URL in the browser's address bar, so if they hit reload on the booking summary they'll just see the search results page and blank booking form again - not what I want.
Any thoughts on a solution are welcome! Thanks

In Dynamics 365, how to customize the email page to add custom image based on email recipient?

We have an enterprise web api that generates a custom coupon barcode for based on customer id or email.
The Dynamics 365 email activity can send out rich emails; we want to insert custom barcode image into the email.
I have already added a button to this ribbon of this page so that it call open a popup window that can execute my javascript.
But I need to get the email address of the recipient in the "To" field of the email. How do I get this field?
When you are opening the popup, you can send the contact detail in param. Or you can read the parent form fields like discussed here based on your implementation.
Either way, you have to get the activity party list from To field & again you have to make a service call to pull email address. Because only Id & Display Name will be readily available in party list or lookup. Everything else has to be retrieved from server.

Joomla 2.5 - RSForm! PRO Email Submission Based on User

I have this scenario in mind:
I would like to implement the form in such a way that it sends the form to different email addresses based on User.
Scenario:
User A sends Form X to Email Address 1
User B sends Form X to Email Address 2
User C sends Form X to Email Address 3
I can used {global:fullname} to capture the logged in user. Currently, I have a set of list (dropdown) for users to choose the email address to send to. It does not look professional and I intend to change the workflow.
Any help or assistance is greatly appreciated.
Thank you.
RSForm PRO is a very powerful forum builder. It allows you to add code to your forms to manipulate the behavior of the form.
In this post http://www.itoctopus.com/how-to-easily-create-notification-emails-for-form-submissions-in-rsform , we explain how to create a notification email. You will need to take the code in the post, and then, based on the logged in user, you modify the $mailer->addRecipient('[our-client-email]'); code in order to send the email to the appropriate user. Of course, you will need to make some other minor changes, but you get the point.
Hope this helps!

Magento Contact form error

I am running a multi store magento application enterprise 1.14.1.0.
For one store, the contact form is not working. When submitting the contact us form it says "Unable to submit your request, please try again later".
This issue is not happening for other stores.
Order confirmation emails are also not being sent. Back-end configurations are correctly set.

Magento - change address to which confirmation is sent after newsletter subscription

By default, Magento sends out a confirmation email (to the user) after a user subscribes to the newsletter. Is it possible to change the email address to which the confirmation is sent?
Thanks
Refer to my answer to your question about changing the action path of the subscribe.phtml file. If you override the newAction in subscriberController.php, you will be able to add in all your extra requirements, such as emailing the store admin, changing the information in the outgoing email, etc.
There is a detailed walkthrough on the Magento wiki on how to configure Magento to use your custom controller instead of the core. This is best practice as it means that future patches/upgrades from Magento shouldn't break your customization.

Resources