Post by burrito » Sat Feb 13, 2010 2:33 am

Basic module for OpenCart 1.4.0 that allows login for customers in a module (left and right placement, etc)

When logged in it gives the account links
http://www.opencart.com/index.php?route ... ion_id=428

I know something like this already exists but I am not sure what happens with that one when you log in, so I made one as well and I like to share ;)

English and Dutch (see screenshot) languages added

It's actually a default template, the screenshot looks different because I don't have default installed on my webserver

Attachments

Untitled.jpg

Untitled.jpg (21.3 KiB) Viewed 2201 times


Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by flightoffancy » Sat Feb 13, 2010 2:25 pm

I think I found a bug with this mod.

All works fine unless you have this mod enabled and then try to login using the normal account/login page. If you try to login from that page you get the "E-mail address and/or password are incorrect" message.

I understand that this mod is probably meant to replace the login page but there will be some shop owners that want to use both.

ETA: Instead of posting another reply I'll just add onto this one.
Is it possible to have the page persist instead of being redirected to the account page on login? It seems kind of pointless to have the account links show up in the sidebox and then be taken directly to the page that contains those exact same links.

New member

Posts

Joined
Fri Jan 22, 2010 9:34 pm

Post by burrito » Sat Feb 13, 2010 4:47 pm

flightoffancy wrote:I think I found a bug with this mod.

All works fine unless you have this mod enabled and then try to login using the normal account/login page. If you try to login from that page you get the "E-mail address and/or password are incorrect" message.

I understand that this mod is probably meant to replace the login page but there will be some shop owners that want to use both.

ETA: Instead of posting another reply I'll just add onto this one.
Is it possible to have the page persist instead of being redirected to the account page on login? It seems kind of pointless to have the account links show up in the sidebox and then be taken directly to the page that contains those exact same links.
I've been looking into that, I havent found a way to do that yet, also due to the error message needing to be displayed somewhere. I have an idea for that but remaining on the same page I still haven't figured out.... it's a bit strange...

EDIT: the bug you found about logging in, that works fine for me, no problems logging in through whatever page

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by Qphoria » Sat Feb 13, 2010 9:34 pm

The reason is likely a post conflict with 2 fields with the same name on the same page
if you have the login page up and the sidebox... and both of them use the same field name "email" or "password" then you will have this problem. Change the sidebox one to something like "module_email" and "module_password"

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by burrito » Sun Feb 14, 2010 5:25 am

Qphoria wrote:The reason is likely a post conflict with 2 fields with the same name on the same page
if you have the login page up and the sidebox... and both of them use the same field name "email" or "password" then you will have this problem. Change the sidebox one to something like "module_email" and "module_password"
yeah that's what I wanted to test... but for me the error didn't occur... I can change the names anyway... it's not the field names, it's the form name

Image
Opencart specialist | Our website | Our modules


User avatar
Active Member

Posts

Joined
Tue Dec 15, 2009 6:10 pm
Location - Amsterdam, The Netherlands

Post by Qphoria » Sun Feb 14, 2010 6:44 am

might be both.

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by mau » Mon Mar 29, 2010 7:38 pm

Hello, i wanted to install this pluggin. Went to admin, installed it but when i try clicking edit i get this:

"
Fatal error: Call to a member function https() on a non-object in ...\admin\controller\module\account.php on line 43"

The problem is with the lines that contain https...

I had a look at the other login module posted by somebody else and saw another method which i successfully implemented in yours:

I had to replace the following lines in admin/controller/module/account.php:

Code: Select all

$this->redirect($this->url->https('extension/module'));
with

Code: Select all

$this->redirect((((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=extension/module'));
and

Code: Select all

$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => $this->url->https('common/home'),
       		'text'      => $this->language->get('text_home'),z
      		'separator' => FALSE
   		);

   		$this->document->breadcrumbs[] = array(
       		'href'      => $this->url->https('extension/module'),
       		'text'      => $this->language->get('text_module'),
      		'separator' => ' :: '
   		);
		
   		$this->document->breadcrumbs[] = array(
       		'href'      => $this->url->https('module/account'),
       		'text'      => $this->language->get('heading_title'),
      		'separator' => ' :: '
   		);
		
		$this->data['action'] = $this->url->https('module/account');
		
		$this->data['cancel'] = $this->url->https('extension/module');
with

Code: Select all

$this->document->breadcrumbs = array();

   		$this->document->breadcrumbs[] = array(
       		'href'      => (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=common/home'),
       		'text'      => $this->language->get('text_home'),
      		'separator' => FALSE
   		);

   		$this->document->breadcrumbs[] = array(
       		'href'      => (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=extension/module'),
       		'text'      => $this->language->get('text_module'),
      		'separator' => ' :: '
   		);
		
   		$this->document->breadcrumbs[] = array(
       		'href'      => (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=module/account'),
       		'text'      => $this->language->get('heading_title'),
      		'separator' => ' :: '
   		);	
		
		
		$this->data['action'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=module/account');
		$this->data['cancel'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=extension/module');
After replacing the above, i got the same error for catalog/controller/module/account.php:

I had to do the same thing for this one as well, practically replacing

$this->url->https('.........

with

(((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=.............


so what i replaced was (notice that first line has http instead of https):

Code: Select all

	$this->data['account_create'] = $this->url->http('account/create');
		$this->data['forgotten'] = $this->url->https('account/forgotten');
		$this->data['information'] = $this->url->https('account/edit');
    	$this->data['password'] = $this->url->https('account/password');
		$this->data['address'] = $this->url->https('account/address');
    	$this->data['history'] = $this->url->https('account/history');
    	$this->data['download'] = $this->url->https('account/download');
		$this->data['newsletter'] = $this->url->https('account/newsletter');
		$this->data['logout'] = $this->url->https('account/logout');
with

Code: Select all

	$this->data['account_create'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/create');
		$this->data['forgotten'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/forgotten');
		$this->data['information'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/edit');
    	$this->data['password'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/password');
		$this->data['address'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/address');
    	$this->data['history'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/history');
    	$this->data['download'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/download');
		$this->data['newsletter'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/newsletter');
		$this->data['logout'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/logout');
and

Code: Select all

$this->data['action'] = $this->url->https('account/login');
with

Code: Select all

$this->data['action'] = (((HTTPS_SERVER) ? HTTPS_SERVER : HTTP_SERVER) . 'index.php?route=account/login');
Please excuse me for posting so much code, but i did it in hopes of helping those that stumble into the same problem as me.

mau
Newbie

Posts

Joined
Wed Feb 10, 2010 5:41 pm
Who is online

Users browsing this forum: No registered users and 8 guests