koala_dev Posted October 14, 2013 Share Posted October 14, 2013 (edited) I'm experiencing a strange behavior in my prestashop installation, I have enabled "One-page" checkout but whenever I try to access the shopping cart (quick order) page I get redirected to the add new address page. So when clicking a link that points to http://mystore.com/quick-order I get redirected to http://mystore.com/address?back=order.php%3Fstep%3D1%26multi-shipping%3D0. Does anyone know how to correct this? Edited October 14, 2013 by koala_dev (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted October 16, 2013 Share Posted October 16, 2013 Try to turn off all Caching, all ccc's to "original", force reload of smarty templates (Advanced Parameters) Then try to toggle Friendly URL's, and reload the front page (Ctrl-F5) , and see if going to order page works. Then try to toggle Friendly URL's back to original state. Then return caching, ccc, force reload template etc to original state. Hope this helps, pascal Link to comment Share on other sites More sharing options...
pacquaio Posted October 27, 2013 Share Posted October 27, 2013 I have the same issue and I tried that and it didn't help. This issue only occur if you are logged in. So if you are logged in and go to checkout it forces you to the page for adding another address. I am on prestashop 1.5.4.1. Please help, this sucks for all registered customers. Link to comment Share on other sites More sharing options...
PascalVG Posted October 30, 2013 Share Posted October 30, 2013 Pacquaio, Do you use a custom Theme, or just default one? If custom theme, please temporarily change to the default theme, and see if it still happens. (also, re-apply caching suggestions as given after changing the theme) Let us know the result, pascal Link to comment Share on other sites More sharing options...
koala_dev Posted November 6, 2013 Author Share Posted November 6, 2013 @Pascal I still experience the same behavior after reverting to the default theme and disabling caching and friendly URL's. It appears this only happens when the user has not yet added any addresses. The links that point to http://mystore.com/index.php?controller=order-opc are redirected to http://mystore.com/index.php?controller=address&back=order%3Fstep%3D1%26multi-shipping%3D0 and the only way to get the order page is by adding a new address. Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 6, 2013 Share Posted November 6, 2013 This happening because there is a function in ParentOrderController.php which will redirecting the logged in user to the address page if s/he doesn't have an addres yet. protected function _assignAddress() { /* ... code ...*/ elseif (!Customer::getAddressesTotalById((int)(self::$cookie->id_customer))) Tools::redirect('address.php?back=order.php?step=1'); /* ... code ...*/ } This function was used in OrderOpcController.php inside public function preProcess() public function preProcess() { /* ... code ...*/ case 'getAddressBlockAndCarriersAndPayments': if (self::$cookie->isLogged()) { // check if customer have addresses if (!Customer::getAddressesTotalById((int)(self::$cookie->id_customer))) die(Tools::jsonEncode(array('no_address' => 1))); /* ... code ...*/ $this->_assignAddress(); /* ... code ...*/ } Link to comment Share on other sites More sharing options...
koala_dev Posted November 6, 2013 Author Share Posted November 6, 2013 @gonebdg Thanks for the info, that certainly seems to be the issue, is there anyway to correct it? If I simply remove the redirect line the page lands in an infinite redirect loop Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 7, 2013 Share Posted November 7, 2013 This is not a Prestashop Bug's, this is the SOP Prestashop But i think you can do something like this to replace Tools::redirect() But then you should modify the next step, to make sure customer add an addressBut then you should modify the next step else if (!Customer::getAddressesTotalById($this->context->customer->id)) { $this->context->cart->id_address_delivery = 1; $this->context->cart->id_address_invoice = 1; } Link to comment Share on other sites More sharing options...
Godangel Posted November 24, 2013 Share Posted November 24, 2013 (edited) Thanks for the info, that certainly seems to be the issue, is there anyway to correct it? If I simply remove the redirect line the page lands in an infinite redirect loop Because there is another redirection a little lower. To be exact there are two parts of code in ParentOrderController.php, which need to be removed to solve the problem. protected function _assignAddress() { /* ... */ else if (!Customer::getAddressesTotalById($this->context->customer->id)) Tools::redirect('index.php?controller=address&back='.urlencode('order.php?step=1&multi-shipping='.(int)Tools::getValue('multi-shipping'))); /* ... */ if (!count($customerAddresses)) { $bad_delivery = false; if (($bad_delivery = (bool)!Address::isCountryActiveById((int)$this->context->cart->id_address_delivery)) || (!Address::isCountryActiveById((int)$this->context->cart->id_address_invoice))) { $back_url = $this->context->link->getPageLink('order', true, (int)$this->context->language->id, array('step' => Tools::getValue('step'), 'multi-shipping' => (int)Tools::getValue('multi-shipping'))); $params = array('multi-shipping' => (int)Tools::getValue('multi-shipping'), 'id_address' => ($bad_delivery ? (int)$this->context->cart->id_address_delivery : (int)$this->context->cart->id_address_invoice), 'back' => $back_url); Tools::redirect($this->context->link->getPageLink('address', true, (int)$this->context->language->id, $params)); } } /* ... */ } P.S. I hope that address requirement will be optional in future versions as nowadays many shops don't need it in a way it is. Virtual products is a good way to get rid of an address, but it lacks some features (such as combinations) and not applicable to any shop. Edited November 24, 2013 by Godangel (see edit history) Link to comment Share on other sites More sharing options...
ben mbarek afef Posted April 2, 2014 Share Posted April 2, 2014 Hi, i have the some problem but when the customer was logged by the module sociallogin . helppp please (( Link to comment Share on other sites More sharing options...
PascalVG Posted April 4, 2014 Share Posted April 4, 2014 Hi ben, can you explain a little bit more what exactly is going wrong? Do you have a link to your site, so we can see it ourselves? What PS version do you use? Any Theme used, or just default? pascal. Link to comment Share on other sites More sharing options...
ben mbarek afef Posted April 4, 2014 Share Posted April 4, 2014 hi , i used prestashop 1.5.6.0 with the default template , sorry i don't have the link because the site in maitenance for the moment but i think that I can explain the problem: when the customer connect with google, facebook, tweeter account and place an order he must add a new address each time when it connect though he has already addresses that are registered with this site. Link to comment Share on other sites More sharing options...
PascalVG Posted April 5, 2014 Share Posted April 5, 2014 hmm, I don't know that module, but it seems they don't create a PrestaShop user correctly that is linked to the social login user. If you then login again, it probably just makes a new PS user (or it cannot correctly find the old one or so), so that a new address is needed every time. Where did you get thst module? Is it compatible with PS 1.5.6.0, according to the developer? Link to comment Share on other sites More sharing options...
ben mbarek afef Posted April 5, 2014 Share Posted April 5, 2014 yes it's compatible avec prestashop 1.5.60 , I can not share the module in this site, and I don't found the link unfortunately : ( but please have you a suggestion how i can resolve this problem... Link to comment Share on other sites More sharing options...
ben mbarek afef Posted April 5, 2014 Share Posted April 5, 2014 yes it 's compatibe with 1.5.6 ,I can't share the module in this site and i don't found the link also :/ have you a suggestion how i can resolve this problem please and wich class i can override . Link to comment Share on other sites More sharing options...
PascalVG Posted April 9, 2014 Share Posted April 9, 2014 That's hard to say without having the module :-( Link to comment Share on other sites More sharing options...
PF22 Posted April 28, 2014 Share Posted April 28, 2014 Hi there. Impossible for a customer to add or modify a new postal address when he is log in. Blank page as result. I use Prestashop 1.4.6.2 and I have the same problem using any theme. If you have any clue... Thank you ! Link to comment Share on other sites More sharing options...
PascalVG Posted April 29, 2014 Share Posted April 29, 2014 Hi Pat, White screens normally indicate some error on a page. Please turn on debug mode to get more info on the error. Then, if you're still stuck, copy and paste the error Message here. (Search google on 'prestashop debug mode' on how to turn on debug mode) Pascal 1 Link to comment Share on other sites More sharing options...
PF22 Posted April 29, 2014 Share Posted April 29, 2014 (edited) Thank you Pascal. I tried to turn debug mode on, but no change, white screen... Could it be a problem linked with Smarty ? Edited April 29, 2014 by Pat_07 (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted May 3, 2014 Share Posted May 3, 2014 Pat, can you send me an URL to your site, so I can see it for myself? 1 Link to comment Share on other sites More sharing options...
PF22 Posted May 7, 2014 Share Posted May 7, 2014 Pat, can you send me an URL to your site, so I can see it for myself? Thank you Pascal. Sorry for my late reply here is the website ramscores.com Link to comment Share on other sites More sharing options...
Denkoooo Posted March 28, 2015 Share Posted March 28, 2015 Hi, I have the same problem with being redirect to addresses instead to quick-order. I am using the "One page checkout" module. The problem only occurs if I enable the codr klarna checkout module. I have deleted the lines from parentordercontroller.php and then the redirect works properly however when I choose a payment method and I press "back" my original customer email adress gets automatically changed for a preset email from codr klarna checkout.. and I dont know why this happens. can somebody assist. I have disable the klarna check out..so please let me know if somebody can help so i can activate it again for testing. website: www.markone-fashion.com thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now