Page 1 of 1

PHP Notice: Undefined variable: button_submit in /home/

Posted: Fri Sep 18, 2015 8:33 am
by ErnestoMorales
Hello,

I'm getting this error and the Submit button in english displays its name correctly but in spanish just displays: buton_submit.

PHP Notice: Undefined variable: button_submit in /home/digibits/public_html/ocart2/catalog/view/theme/default/template/information/contact.tpl on line 146

This isn line 146:
<input class="btn btn-primary" type="submit" value="<?php echo $button_submit; ?>" />

Opencart has default template and is Version 2.0.3.1.

You can check this error in the spanish option at: http://digibits.mx/ocart2/index.php?rou ... on/contact

Thank you.

Re: PHP Notice: Undefined variable: button_submit in /home/

Posted: Fri Sep 18, 2015 2:04 pm
by deepvision
You can try to add it to the catalog/language/spanish/information/contact.php file:

Code: Select all

$_['button_submit'] = 'Submit'; 
But hard to tell for sure not being able to see the code of the controller:
catalog/controller/information/contact.php

Re: PHP Notice: Undefined variable: button_submit in /home/

Posted: Sat Sep 19, 2015 1:00 am
by ErnestoMorales
Hello Deepvision, thank you for your reply!

Solved! I added to the catalog/language/spanish/information/contact.php file:

$_['button_submit'] = 'Enviar';

Now The variable is declared and the Send (Enviar) button is displaying its text correctly.