Error:
Code: Select all
PHP Notice: Undefined index: enquiry in /home/xxx/storage/modification/catalog/controller/information/contact.php on line 196
Code: Select all
if ((utf8_strlen($this->request->post['enquiry']) < 10) || (utf8_strlen($this->request->post['enquiry']) > 3000)) {
$this->error['enquiry'] = $this->language->get('error_enquiry');
}
Code: Select all
<file path="catalog/controller/information/contact.php">
<operation error="skip">
<search>
<![CDATA[$mail->setText($this->request->post['enquiry']);]]>
</search>
<add position="replace">
<![CDATA[
$mail->setText(
"Make and Model: \n" . $this->request->post['vehicle'] . "\n\n" .
"How did you hear about us: \n" . $this->request->post['hearaboutus'] . "\n\n" .
"Enquiry: \n" . $this->request->post['enquiry']
);
]]>
</add>
</operation>
<operation error="skip">
<search>
<![CDATA[$data['button_submit'] = $this->language->get('button_submit');]]>
</search>
<add position="before">
<![CDATA[
if (isset($this->error['vehicle'])) {
$data['error_vehicle'] = $this->error['vehicle'];
} else {
$data['error_vehicle'] = '';
}
if (isset($this->error['hearaboutus'])) {
$data['error_hearaboutus'] = $this->error['hearaboutus'];
} else {
$data['error_hearaboutus'] = '';
}
]]>
</add>
</operation>
<operation error="skip">
<search>
<![CDATA[protected function validate() {]]>
</search>
<add position="after">
<![CDATA[
if ((utf8_strlen($this->request->post['vehicle']) < 3) || (utf8_strlen($this->request->post['vehicle']) > 300)) {
$this->error['vehicle'] = $this->language->get('error_vehicle');
}
if ((utf8_strlen($this->request->post['hearaboutus']) < 3) || (utf8_strlen($this->request->post['hearaboutus']) > 300)) {
$this->error['hearaboutus'] = $this->language->get('error_hearaboutus');
}
]]>
</add>
</operation>
</file>