Page 1 of 1

text_register instead of create acoount

Posted: Sun Mar 06, 2011 4:17 pm
by london27
Hi guys,

I'm new to opencart. I'm using Opencart Europa v 1.4.9.1. All is good except when going to checkout, login or create account page. Instead login or create account it shows text_register. I have tried to redefine it, but it seems that I do something wrong. Can anyone help me, please..

Re: text_register instead of create acoount

Posted: Sun Mar 06, 2011 5:16 pm
by i2Paq
It's a sort of Fork which cannot be supported by this community.
You should ask the creator of that version.

Re: text_register instead of create acoount

Posted: Mon Mar 07, 2011 1:55 am
by openmycart.com
what is Opencart Europa and where can I found this hell?

Re: text_register instead of create acoount

Posted: Mon Mar 07, 2011 2:47 am
by london27

Re: text_register instead of create acoount

Posted: Mon Mar 21, 2011 11:45 pm
by thesparky1
london27 wrote:Hi guys,

I'm new to opencart. I'm using Opencart Europa v 1.4.9.1. All is good except when going to checkout, login or create account page. Instead login or create account it shows text_register. I have tried to redefine it, but it seems that I do something wrong. Can anyone help me, please..
Hi I also have this version installed and I also have the same problem that the register radio button says text_register. Did you manage to solve this? Or can anyone else help?

Re: text_register instead of create acoount

Posted: Tue Mar 22, 2011 12:00 am
by SapporoGuy
Not positive but 2 problems could exist:

1.) the variable was not registered in the controller
2.) and it might be missing from the language file

copy/paste/edit will take care of this problem ... probably :)

Re: text_register instead of create acoount

Posted: Tue Mar 22, 2011 12:54 am
by thesparky1
Thx for the advice but I am a newbie and I dont know what to copy and where to paste it. Can you elabarate? Or this is the code in my cataloge /controller/account/login.php can anyone see the problem?

Code: Select all

<?php 
class ControllerAccountLogin extends Controller {
	private $error = array();
	
	public function index() {
		if ($this->customer->isLogged()) {  
      		$this->redirect(HTTPS_SERVER . 'index.php?route=account/account');
    	}
	
    	$this->language->load('account/login');

    	$this->document->title = $this->language->get('heading_title');
						
		if (($this->request->server['REQUEST_METHOD'] == 'POST')) {
			if (isset($this->request->post['account'])) {
				$this->session->data['account'] = $this->request->post['account'];
				
				if ($this->request->post['account'] == 'register') {
					$this->redirect(HTTPS_SERVER . 'index.php?route=account/create');
				}
				
				if ($this->request->post['account'] == 'guest') {
					$this->redirect(HTTPS_SERVER . 'index.php?route=checkout/guest_step_1');
				}
			}
			
			if (isset($this->request->post['email']) && isset($this->request->post['password']) && $this->validate()) {
				unset($this->session->data['guest']);
				
				$this->load->model('account/address');

	            $address = $this->model_account_address->getAddress($this->customer->getAddressId());

				$this->tax->setZone($address['country_id'], $address['zone_id']);
				
				if (isset($this->request->post['redirect'])) {
					$this->redirect(str_replace('&', '&', $this->request->post['redirect']));
				} else {
					$this->redirect(HTTPS_SERVER . 'index.php?route=account/account');
				} 
			}
    	}  
		
      	$this->document->breadcrumbs = array();

      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=common/home',
        	'text'      => $this->language->get('text_home'),
        	'separator' => FALSE
      	);
 
      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=account/account',
        	'text'      => $this->language->get('text_account'),
        	'separator' => $this->language->get('text_separator')
      	);
		
      	$this->document->breadcrumbs[] = array(
        	'href'      => HTTP_SERVER . 'index.php?route=account/login',
        	'text'      => $this->language->get('text_login'),
        	'separator' => $this->language->get('text_separator')
      	);
				
    	$this->data['heading_title'] = $this->language->get('heading_title');

		$this->data['text_new_customer'] = $this->language->get('text_new_customer');
    	$this->data['text_i_am_new_customer'] = $this->language->get('text_i_am_new_customer');
		$this->data['text_checkout'] = $this->language->get('text_checkout');
    	$this->data['text_register'] = $this->language->get('text_register');
    	$this->data['text_guest'] = $this->language->get('text_guest');   	
    	$this->data['text_create_account'] = $this->language->get('text_create_account');
		$this->data['text_returning_customer'] = $this->language->get('text_returning_customer');
		$this->data['text_i_am_returning_customer'] = $this->language->get('text_i_am_returning_customer');
    	$this->data['text_forgotten_password'] = $this->language->get('text_forgotten_password');

    	$this->data['entry_email'] = $this->language->get('entry_email_address');
    	$this->data['entry_password'] = $this->language->get('entry_password');

    	$this->data['button_continue'] = $this->language->get('button_continue');
		$this->data['button_guest'] = $this->language->get('button_guest');
		$this->data['button_login'] = $this->language->get('button_login');

		if (isset($this->error['message'])) {
			$this->data['error'] = $this->error['message'];
		} else {
			$this->data['error'] = '';
		}
		
		$this->data['action'] = HTTPS_SERVER . 'index.php?route=account/login';

    	if (isset($this->request->post['redirect'])) {
			$this->data['redirect'] = $this->request->post['redirect'];
		} elseif (isset($this->session->data['redirect'])) {
      		$this->data['redirect'] = $this->session->data['redirect'];
	  		
			unset($this->session->data['redirect']);		  	
    	} else {
			$this->data['redirect'] = '';
		}

		if (isset($this->session->data['success'])) {
    		$this->data['success'] = $this->session->data['success'];
    
			unset($this->session->data['success']);
		} else {
			$this->data['success'] = '';
		}
		
		if (isset($this->session->data['account'])) {
			$this->data['account'] = $this->session->data['account'];
		} else {
			$this->data['account'] = 'register';
		}
		
    	$this->data['forgotten'] = HTTPS_SERVER . 'index.php?route=account/forgotten';
		$this->data['guest_checkout'] = ($this->config->get('config_guest_checkout') && $this->cart->hasProducts() && !$this->cart->hasDownload());

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/account/login.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/account/login.tpl';
		} else {
			$this->template = 'default/template/account/login.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/footer',
			'common/column_left',
			'common/header'
		);
		
		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
  	}
  
  	private function validate() {
    	if (!$this->customer->login($this->request->post['email'], $this->request->post['password'])) {
      		$this->error['message'] = $this->language->get('error_login');
    	}
	
    	if (!$this->error) {
      		return TRUE;
    	} else {
      		return FALSE;
    	}  	
  	}
}
?>

Re: text_register instead of create acoount

Posted: Tue Mar 22, 2011 3:59 am
by SapporoGuy

Code: Select all

      $this->data['text_register'] = $this->language->get('text_register');
add to near 66 or after, there are a few other lines that look likes this

Re: text_register instead of create acoount

Posted: Tue Mar 22, 2011 4:45 am
by thesparky1
Thx for your response Sapporo guy its well apriciated but I am a total newbie so I open the file in Dreamweaver I find the code you posted at line 69, but you say add the code, I did nothing happened I also tried editing the parts that stated text_register that also did nothing I am going nuts with this, do you have any instructions easy to follow maybe I am doing it all wrong.

Re: text_register instead of create acoount

Posted: Tue Mar 22, 2011 11:55 pm
by SapporoGuy
I don't use that version so it is had to help.

1.) Don't use Dreamweaver for editing php files. It's a great piece of software but it is not made for text editing. Try notepad. I'm a mac user so I use BBedit, Textmate and such. Be careful of programs that offering "rich text" since they are more like html editors.

2.) add to the languge file login.php (not really sure ...) but the main English.php is the general language file

Code: Select all

$_['text_register']          = 'Register';
I'm thinking that the person just forgot to define that variable.

Re: text_register instead of create acoount

Posted: Thu Mar 24, 2011 9:16 pm
by thesparky1
Thank you so much mate that has done it, so I guess for languages I go through the different country files and do the same but translated. I will send London27 this update maybe he is still searching for solution.
Cheers!

Re: text_register instead of create acoount

Posted: Thu Mar 24, 2011 9:30 pm
by Qphoria
text_register was changed to text_account back in 1.4.8
The theme you are using was not updated or has its own account/login.tplpage. I'm betting it shouldn't. Try removing that file and it should fix it

Re: text_register instead of create acoount

Posted: Fri Mar 25, 2011 1:07 pm
by london27
Thanks SapporoGuy. That worked fine.