Jump to content
  • 0

Adding


m311ton
 Share

Question

On a product details page, I want a registered user to be able to click a button that says, "Add to my profile." Clicking this button would then basically add this particular item (or record) to the user's account, to be displayed on a profile page. (My goal is to allow users to basically add and list what products they own.)

Could anyone please give me some sense of direction on how to do this? Feel free to ask if my needs aren't clear, but I hope it is simple. Thank you so much for your support, I sincerely appreceiate it!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi,

Here is some solution:

You need kind of one to many relational tables between products and users table, so one user could have many products added to his/her profile.

First you should make sure about the tables structure:

products table has product ID (primary key) and users-products table has user ID, product ID (foreign key),...

In the details page of the product you can create a custom button in an HTML block with onclick event to open another page URL passing the product ID and user ID (based on who has logged in) and this new page contains a Caspio Web Form DataPage againt the users-products table. This Web Form will receive those two params and user can submit the form to get the data in.

Now you can build a Search/Report against this table or you can create a view from all the three tables and just display the data in a one to many relational way.

We have an instruction how to create reports when you have one to many relational pages. Attached please the instruction.

Let me know if that does not help or if I could not address what you were looking for.

Best,

Bahar M.

Link to comment
Share on other sites

  • 0

Thank you for your response. I will give this tutorial a try and let you know how it works out. But so far it sounds like that is what I need. I sincerely appreciate your support, and the great support that Caspio offers. It is truly what makes this a fantastic product!

Link to comment
Share on other sites

  • 0

Hi,

You have got a respose through ticketing system, but here is the idea in general:

This would requires kind of one to many relational tables between products and users table, so one user could have many products added to his/her profile.

First you should make sure about the tables structure so products table has product ID (primary key) and users-products table has user ID, product ID (foreign key),...

In the details page of the product you can create a custom button in an HTML block with onclick event to open another page URL passing the product ID and user ID (based on who has logged in) and this new page contains a Caspio Web Form DataPage againt the users-products table. This Web Form will receive those two params and user can submit the form to get the data in. Then you can build a Search/Report against this table or you can create a view from all the three tables and just display the data in a one to many relational way.

Best,

Bahar M.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...