By wardoost on
Hi,
I'm trying to create a gift registry for my commerce website. I managed to create a node type called 'Protected List' which contains a field with references to the products that are in the list. I need a page or block where people can log in to a protected list and view the list. So users have to fill in the name of the list and password (similar to a regular user login) to see the list. Anybody has any directions for me on this. Thanks in advance!
Comments
This is more of a "How do I
This is more of a "How do I do this.." type of question and should be moved to the Post Installation forum.
One way to do this would be to use Views and Protected Pages module. I have never used the latter module but it appears to do what you want.
Not the exact same flow, but set up a view that searches and displays protected list nodes. Then when you click on them, the URL is password protected with the Protected Pages module.
This should give you a starting point and allow you to figure out a workflow that does what you need.
~Chad
Thanks for the reply Chad.
Thanks for the reply Chad.
The problem with this flow is that the names of the protected list should be private. It's for a shop with mainly products for baby's so the protected lists are titled after the baby's name so it's delicate information. They can't be displayed in a public list/view.
I have already been testing and trying out the Protected Pages module which gives me a second problem that I need to be able to set the password manually..
Try this then
It sounds like you will need to create a custom module to try and then use the help of a few contrib modules to do exactly what you want.
You can use:
https://drupal.org/project/password_field
This can be used to add a password field to protected list node.
You may also want to use:
https://drupal.org/project/unique_field
To force a unique title on the node as it sounds like you are using that as a psuedo username.
Then you would need a custom module, I have roughed something out for you but you will need to do some work to fill it in based on your requirements:
I hope that helps.
~Chad
Thanks for your starting
Thanks for your starting point Chad. I'm a total newbie to drupal module development so I'm starting to learn how to code Drupal modules.
Your starting point has already thought me alot so thanks again :) I'll post back when I figured this out.
Hi,
Hi,
I wrote my first custom module. Here is the code I used for my node_login.module file.
I used the Node access user reference module to grant access to the gift list nodes by adding them to a user reference field. The advantage of this approach is that I can easily see who has accessed the list. I also used a date field instead of a password field. Thanks for the help again :)