Jeffro Posted October 24, 2013 Share Posted October 24, 2013 I am hoping that someone can help me. I have Multistore enabled with a retail site and a wholesale site. I am using a sub-domain for the wholesale store. I would like to add a password to enter the wholesale site. Is this possible and if so how please? TIA -Jeffro Link to comment Share on other sites More sharing options...
Jeffro Posted October 24, 2013 Author Share Posted October 24, 2013 Is anybody out there? Link to comment Share on other sites More sharing options...
El Patron Posted October 24, 2013 Share Posted October 24, 2013 I don't know of a way you could do this..not with native PrestaShop. It is after all a one back office multistore. Link to comment Share on other sites More sharing options...
Jeffro Posted October 24, 2013 Author Share Posted October 24, 2013 I was afraid of that. Can you think of any way? TIA Link to comment Share on other sites More sharing options...
Jeffro Posted October 24, 2013 Author Share Posted October 24, 2013 Thank you for your help by the way El Patron! Link to comment Share on other sites More sharing options...
El Patron Posted October 25, 2013 Share Posted October 25, 2013 No, I can't think of any way to do this. Sorry. Link to comment Share on other sites More sharing options...
parsifal Posted October 26, 2013 Share Posted October 26, 2013 (edited) You should try to find a solution outside PrestaShop's native functionality, since there is none on this subject to speak of. Maybe with .htaccess, if your site is running on the Apache web server? E.g.: https://www.google.com/search?q=htaccess+password+subdomain Edited October 26, 2013 by parsifal (see edit history) 1 Link to comment Share on other sites More sharing options...
r00Syntax Posted February 9, 2014 Share Posted February 9, 2014 I have managed to enable multistore ans password protect one shop with password. 1/ (Main shop) retail store open to public ------ domain.com 2/ (Wholesale shop) subdoman password protected ---- sub.domain.com domain.com is in root directory sub.domain.com is set up in cpanel to point to domain.com root directory In the domain.com htaccess file after # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again you can add this as a conditional statement which says if user is on subdomain ask for password if not then Ok #Substitute sub.domain.com for your subdomain name SetEnvIf Host ^sub\.domain\.com$ is_on_sub_.domain Order deny,allow Deny from env=is_on_sub_domain # require password if access would otherwise be denied Satisfy any # Put your password auth stuff here AuthName "Password Protected Area" AuthType Basic #Substitute domain.com and absolute path to your domain.com directory. AuthUserFile /home/user/public_html/domain.com/.htpasswd Require valid-user So when a user goes to your main site all is good When a user goes to your subdomain they are greeted with user/password to enter site Hope this helps Link to comment Share on other sites More sharing options...
El Patron Posted February 10, 2014 Share Posted February 10, 2014 thanks for sharing syntax, how does one update the server? using putty to update text file with passwords? another humble solution, supports multishop i.e. enable module by shop http://www.etiendas.co/en/37-private-shop-authorized-only.html Link to comment Share on other sites More sharing options...
r00Syntax Posted February 10, 2014 Share Posted February 10, 2014 (edited) thanks for sharing syntax, how does one update the server? using putty to update text file with passwords? Personally I use Filezilla to upload/ edit the .htpasswd file to a directory of your choice preferably outside of the root directory. you can generate a .htpasswd file here http://www.htaccesstools.com/htpasswd-generator/ An if you need to update the htpasswd just repeat the process. Imo the module you mentioned dosnt really encompass password protecting a whole domain completely I prefer to keep the whole site from prying eyes and give the user/pass to trusted wholesale clients. the basic purpose is just to prevent general public from seeing the wholesale site. And restricting search bots from indexing the wholesale subdomian through robots txt files. although not 100% bullet proof maybe the implementation of hiding prices would be a secondary layer of privacy. i had thought of trying to introduce a conditional statement where you could alter the css attributes which display the prices dependent on whether a a user was logged in or not such as below in pseudo code: If logged in then use thisstyle.css ------ default css if not logged in then use thisstyle.css ----- puplic_default.css with .price_attributes, .price_displayed_on_site { display:none; } Something along those lines Although this dosn't stop someone after logging in or compromising your htacess rule from inspecting the source and changing the css on the fly to see your prices, its however a simple method to make it awkward to view you're site or see prices. Being fairly new to Prestashop Im not sure where I would use this kind of statement. Edited February 10, 2014 by r00Syntax (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted February 10, 2014 Share Posted February 10, 2014 nice way for those that need to hide shop...thanks for sharing...I am considering adding this sort of logic to the module but little by little. 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