Hi,
I want to password protect a CMS page - simple password login form is all that is needed.
Not a customer login, just simple password protected login form to access content.
I recall using a snippet that allowed me to update layout XML to decalre the password, but can't find it anymore.
Can anyone recommend a password protection extension or snippet to pull this off?
Thanks.
Here are a few links that may help...
old example:
http://www.comprepairgurus.com/protect-magento-pages/
Only logged in users can see CMS pages:
http://marius-strajeru.blogspot.com/2012/08/how-to-make-cms-pages-available-only-to.html
simple password protect using .htaccess:
http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/
It seems that you're looking something like user enter password before go into CMS pages and that pasword should be set by admin (means you) from backend.. Is it something you're talking about ?
Was this ever figured out? I have a client asking for a similar setup. They want to be able to have a flash sale area where only people who are email a specific password can access the shop, cart and checkout pages. The password will change weekly and they want to be able to do this.
Currently I am thinking it will be a form asking for a password which I will setup in Custom Variables. If correct a cookie is stored with a short life, otherwise an error message is shown.
If there is a better method, I would love to hear it.
Has anyone answered this? I have the same question.
Simple solution I found but I am not 100% convinced its secure but seems to block the CMS page unless you have entered the right password. Add this to the top of your CMS page content:
<script type="text/javascript"> var password = 'password123' var retVal = prompt("Enter your password : ", "your password here"); if(retVal !== password) { location.assign(''); } </script> <!--START OF CONTENT-->
Hope this helps!
Is there any way or any additional code that would allow the entered password to "hold" for their session? Every time a user navigates away from that cms page, it makes them re-enter the password which I could see as being frustrating to the customer. Thanks in advance!
Is there any way or any additional code that would allow the entered password to "hold" for their session? Every time a user navigates away from that cms page, it makes them re-enter the password which I could see as being frustrating to the customer. Thanks in advance!
Seems to work but the only thing I see is when you go to put text under the <!--start of content-->
it's all pushed to the far left side of the page. Guessing maybe a div or something will have to be added for this but I could be wrong. Going to keep playing to see what I can come up with. Any ways thanks for this little gem. No one seems to have an extension for M2 that will do this yet.