Jump to content
thirty bees forum
  • 0

How to join 2 overrides


Question

Posted

I use recaptcha which creates own override of ContactController.php

However this override is not working together with my other override which I used to disable the sending of "Your message has been correctly sent" email when making contact through contact form.

I added // comment at the line 235 in original ContactController.php file at the moment, but would like to move that to the override file together witch recaptcha.

my line 235:

                        ) // || !Mail::Send($this->context->language->id, 'contact_form', ((isset($ct) && Validate::isLoadedObject($ct)) ? sprintf(Mail::l('Your message has been correctly sent #ct%1$s #tc%2$s'), $ct->id, $ct->token) : Mail::l('Your message has been correctly sent')), $varList, $from, null, null, null, $fileAttachment, null, _PS_MAIL_DIR_, false, null, null, $contact->email)

 

2 answers to this question

Recommended Posts

  • 0
Posted

Manually 🙂

You will need to manually merge both codes, and make sure it works properly.

I suggest you to remove your original override completely, and use different approach to block outgoing email. 

You can use my Consequences module to block this particular email from being send, for example.

  • Like 2
  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...