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!
Open up catalog/controller/account/success.php and look for this code (around line 42):
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:
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:
If the cart was empty they would be taken to the home page.
Peter
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');
}
Code: Select all
$this->data['continue'] = $this->url->link('common/home', '', 'SSL');
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');
}
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
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.
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.
Hmm, that's weird, that should do it. Unfortunately I am out right now so I can't test it for myself.
Peter
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
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?
Who is online
Users browsing this forum: Baidu [Spider] and 277 guests