allisio Posted May 12, 2016 Share Posted May 12, 2016 (edited) I would need to make possible the purchase in the store only to users with a password that will provide me and that will be the same for everyone. So without the password provided by me, you can not buy. Thanks for your help. Edited May 12, 2016 by allisio (see edit history) Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2016 Share Posted May 12, 2016 If you disable guest checkout, then by default only users have an account can place orders you can change the order preference at back office - Preferences - Orders tab Link to comment Share on other sites More sharing options...
allisio Posted May 12, 2016 Author Share Posted May 12, 2016 I know thanks. But I need that only customers who I give the password (equal for all) can buy in the store. If I do as you say, anyone can buy, after registering. Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2016 Share Posted May 12, 2016 I think you will need come customization to make this happens. It depends on how you want to control the access of the page. For example if you need to prevent user to access all pages before enter password? Or just the pages of order process? And how do users know your password? Link to comment Share on other sites More sharing options...
allisio Posted May 12, 2016 Author Share Posted May 12, 2016 Thanks for the reply. I'm happy if customers can see the whole store, but do not have be able to buy until I have given them the password. It should also be fine even if customers can not see anything if I did not give them the password. Link to comment Share on other sites More sharing options...
shokinro Posted May 12, 2016 Share Posted May 12, 2016 Either way you will have to make some custom changes to do that. If you want to block all pages, then you just make change to FrontController.php file. Otherwise you just make changes to OrderCntroller.php. Please use class override to make your changes in a new class file instead of modifying prstashop core files. Link to comment Share on other sites More sharing options...
allisio Posted May 13, 2016 Author Share Posted May 13, 2016 Thanks for the info. I would block the whole site, so that it is accessible only with a password that I do (FrontController.php files), but I'm unfamiliar with php programming. Can you please give me some other indication on the way forward? Link to comment Share on other sites More sharing options...
shokinro Posted May 13, 2016 Share Posted May 13, 2016 since you will also need to create a popup page(window) allow user to enter password and save it to cookie.I do not think it is a simple change. and also I do not know how will you manage the password. So it is difficult to give you more detailed instructions or coding, if you do not understand coding, you may need to find someone else to help I think. Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2016 Share Posted May 14, 2016 I would need to make possible the purchase in the store only to users with a password that will provide me and that will be the same for everyone. So without the password provided by me, you can not buy. Thanks for your help. from technical point of view - it is possible. This feature requires core changes. In this case it will be necessary to create modification of order controller where in init function script will check if password was provided (and if it is proper) or not. And depending on result of this condition - allow to order or not. 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