Post by mistergreen » Fri Jan 17, 2014 3:51 am

how can i get the registration success page to go to common/home instead of account/account? (via the continue button). Or go to common/home bypassing the registration success page alltogether. Also, if anyone can point me to a resource with a proper explanation of how routing works/what to edit, i'd really appreciate it!

Newbie

Posts

Joined
Sun Jan 12, 2014 7:19 am

Post by pedro1993 » Fri Jan 17, 2014 6:22 am

Open up catalog/controller/account/success.php and look for this code (around line 42):

Code: Select all

	if ($this->cart->hasProducts()) {
			$this->data['continue'] = $this->url->link('checkout/cart', '', 'SSL');
		} else {
			$this->data['continue'] = $this->url->link('account/account', '', 'SSL');
		}
You now have two options. If you ALWAYS want the user to be taken to the home page then replace the above code with this:

Code: Select all

$this->data['continue'] = $this->url->link('common/home', '', 'SSL');
OR if the user already has items in the cart and you want them to go to the cart page (as normal in OpenCart) then replace the code with this instead:

Code: Select all

	if ($this->cart->hasProducts()) {
			$this->data['continue'] = $this->url->link('checkout/cart', '', 'SSL');
		} else {
			$this->data['continue'] = $this->url->link('common/home', '', 'SSL');
		}
If the cart was empty they would be taken to the home page.

Peter

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by mistergreen » Sat Jan 18, 2014 6:43 am

Thanks Peter, i really appreciate your help!

i tried that, and it still goes to the "my account" page after hitting the continue button. Is there another file to replace on the server? I'm surprised that did nothing, i'd expect it to have worked, or at least broken it. On the bright side, it seems like routing works basically like i thought. On the dark side, i actually tried changing that file before and it did nothing then either. I assumed there was a different "success" doc i needed to change, but didn't want to break anything so didn't pursue it any further.

Newbie

Posts

Joined
Sun Jan 12, 2014 7:19 am

Post by pedro1993 » Sat Jan 18, 2014 9:11 pm

Hmm, that's weird, that should do it. Unfortunately I am out right now so I can't test it for myself.

Peter

For OpenCart & PHP/MySQL support feel free to PM me :)
Click here for my extentions
Did I help you? Donate here to show support


Active Member

Posts

Joined
Tue Oct 18, 2011 4:31 am
Location - Glasgow, Scotland

Post by mistergreen » Sun Jan 19, 2014 8:22 am

I've tried to send you a PM, it seems to be just sitting in my outbox. Can you let me know if that came through please?

Newbie

Posts

Joined
Sun Jan 12, 2014 7:19 am
Who is online

Users browsing this forum: Baidu [Spider] and 277 guests