Marik Posted September 6, 2018 Share Posted September 6, 2018 Hello, I used this code: {$urls.pages.cart} to get the cart url page. If I am not logged in when I click on the button it redirect me to the cart page what is normal. But if I am logged in, even if I have products on cart or not, the button redirect me to the homepage. Any advices? Thank you! Link to comment Share on other sites More sharing options...
Knowband Plugins Posted September 7, 2018 Share Posted September 7, 2018 What's the URL i.e. output of {$urls.pages.cart} if user is not logged in. I believe it will print like http://www.example.com/cart Also confirm, Are you able to access the cart page if the user is not logged in? Link to comment Share on other sites More sharing options...
Marik Posted September 7, 2018 Author Share Posted September 7, 2018 (edited) 5 hours ago, Knowband Plugins said: What's the URL i.e. output of {$urls.pages.cart} if user is not logged in. I believe it will print like http://www.example.com/cart Also confirm, Are you able to access the cart page if the user is not logged in? Yes, that's exactly what you said. If the user is not logged in the output is /cart and the page is working. If the user is logged in the output is /cart too, but the page is not working, when I hit the button prestashop redirects me to the homepage all the time. It's something wrong in my code? EDIT: It seems that it work if you add link like the following: {$urls.pages.cart}?action=show Edited September 7, 2018 by Marik (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted September 7, 2018 Share Posted September 7, 2018 Yes, You are right. I hadn't noticed that Link to comment Share on other sites More sharing options...
Al Sampedro Posted October 6, 2020 Share Posted October 6, 2020 Hi, same problem here, but I can't find the .tpl file to change that thing. I am using a sticky cart module, and it is very difficult to me to find the location. There is something similar in www/themes/mytheme/templates/checkout/_partials/cart-detailed-actions.tpl But it looks ok there. {$urls.pages.order}, so it must be somewhere else. Any help, please? Al Sampedro from calcetines.com Link to comment Share on other sites More sharing options...
Samantha66 Posted October 16, 2020 Share Posted October 16, 2020 Hello everyone, I solved this problem by disabled token on front office in Prestashop's general settings. 1 1 Link to comment Share on other sites More sharing options...
Pandal Posted April 5, 2022 Share Posted April 5, 2022 (edited) On 10/16/2020 at 11:39 AM, Samantha66 said: Hello everyone, I solved this problem by disabled token on front office in Prestashop's general settings. Something goes wrong within the "static_token" placed in the add to cart form that triggers the ajax request. Your suggestion is right, it helped me, but that's not the "right way" of fixing this. Anyway I'm tired of fixing prestashop bugs so I'll leave the token on front-office disabled. Thank you. Edited April 5, 2022 by Pandal (see edit history) Link to comment Share on other sites More sharing options...
Pedro Posted April 23 Share Posted April 23 Em 4/5/2022 em 8:23 AM, Pandal disse: Something goes wrong within the "static_token" placed in the add to cart form that triggers the ajax request. Your suggestion is right, it helped me, but that's not the "right way" of fixing this. Anyway I'm tired of fixing prestashop bugs so I'll leave the token on front-office disabled. Thank you. Can you show me where is the static_token with a print? 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