Passcode keys

Important info about testing passcode keys

When you give the correct passcode at the passcode prompt form, Locksmith will remember you by saving a session cookie in your browser. That means that when you come back to view the shop, you'll likely still have access, making it seem like the lock isn't working. 

So, when testing passcode keys, be sure to use a new private browser window each time. That shows you what a new visitor will see.

General Passcode Key Notes

  • Passcode keys allow you to require a password for access without requiring the customer to log into an account. They are completely separate from the customer account system.
  • Passcode keys will increase loading time just a bit, on the first page load.
  • The passcode key is what we call a "server key" which saves info in your cart attributes. That info gets passed through as a note on your orders. You can remove that following the steps here.
  • There are two passcode keys available: "Permit if the customer gives the passcode" and "Permit if the customer gives one of many passcodes"
  • Passcode entry entry applied across your entire store, so if you set multiple locks with the same passcode, entering the passcode at any of those locked pages will also allow the customer to access the other locked resources--all without requiring another passcode entry. This also works to reveal navigation links pointing to those locked resources, when the "hide links" option is enabled on a lock. 

Passcode Key Options 

Passcode uses left

Found in the single passcode key. Use this option only if you want the passcode to have a usage limit. The number will decrease by one each time the passcode is entered. When the number hits zero, the passcode will no longer work.

Remember for signed in customers

This option will remember a customer who was signed in when they entered the passcode, and never ask them again when they're signed in.

Customer auto tag 

If the customer is logged into their account when they give the passcode, they'll get tagged with the tag you enter here.

Allow only one use per passcode 

Found in the "many passcodes" key. When the customer gives a passcode from the list, it gets removed from the list and can't be used again (unless you re-add it).

Passcodes and Manual Locking

If you have a manual lock set up on your resources, such as hiding prices and/or the add to cart button, the customer will not get prompted for a passcode automatically. So in this case it's necessary to add a button to trigger the passcode prompt. Here's an example button: 

<a href="" class="btn button locksmith-manual-trigger">Log in to purchase</a>

The important parts of that are the class "locksmith-manual-trigger" and the href="", that can be applied to a button styled to match your theme.

When the customer clicks that button, they'll be presented with the passcode prompt. If they enter the correct passcode and submit, the page will reload but this time showing your locked content. 

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.