Forums
This topic is locked
can anyone try this ...
Posted 17 Mar 2002 16:39:57
1
has voted
17 Mar 2002 16:39:57 salman khan posted:
i am using ultradev to sell few books online. how do i allow my users to read and also facility to write reviews on the book. i mean think i need to make another table called reviews right. with regards
salman.
Replies
Replied 17 Mar 2002 23:23:43
17 Mar 2002 23:23:43 Dennis van Galen replied:
i mean think i need to make another table called reviews right.
Yes, i'm assuming you know your way around UDev alittle...
you create a new table called reviews this would have fields:
"ReviewID", A unique ID field
"BookID", This is in relation to the BookID in your product, name it as such.
"ReviewTitle", a title for quick feedback, someone could type "great book" or "this sucks" here.
"Reviewer", a text field holding reviewer's name
"Reviewtext", a memo field so user's review can be bigger than 250 characters.
You draw the data in your page by making a seperate query of this table, set up in simple mode selecting all but the "reviewtext" and filtering on the value of your BookID.
Now on your book detail page add a table where you want the reviews to popup, and the easiest is to drag in the dynamic "ReviewTitle" followed by "Reviewer" then click on the ReviewTitle placeholder and make it go to where the full review (or all) reviews are displayed. For ease, a "goto detail page" would suffice, pass existing parameters if you want.
Lastly we add a "show region if recordset is NOT empty" serverbehavior and add another table saying "There's no reviews for this book at this time, do you want to be the first to write one ? Then click <u>here</u>". And give that a "show region if recordset is empty". This link would go to the same adress as your "write a review" page.
That page can be made simply by using "Insert -> live objects -> Record insertion form".
It's not so hard, if you know how to make nested repeat region you could also show the reviews on the product page the first time user gets there, that's why just showing the titles is easier. But there's nested repeat regions in the tutorial section, there's two right here: www.udzone.com/index.asp?TypeId=2&CatId=180
Happy developing.
With kind regards,
Dennis van Galen
Webmaster KPN Services
Financial and Information Services
Yes, i'm assuming you know your way around UDev alittle...
you create a new table called reviews this would have fields:
"ReviewID", A unique ID field
"BookID", This is in relation to the BookID in your product, name it as such.
"ReviewTitle", a title for quick feedback, someone could type "great book" or "this sucks" here.
"Reviewer", a text field holding reviewer's name
"Reviewtext", a memo field so user's review can be bigger than 250 characters.
You draw the data in your page by making a seperate query of this table, set up in simple mode selecting all but the "reviewtext" and filtering on the value of your BookID.
Now on your book detail page add a table where you want the reviews to popup, and the easiest is to drag in the dynamic "ReviewTitle" followed by "Reviewer" then click on the ReviewTitle placeholder and make it go to where the full review (or all) reviews are displayed. For ease, a "goto detail page" would suffice, pass existing parameters if you want.
Lastly we add a "show region if recordset is NOT empty" serverbehavior and add another table saying "There's no reviews for this book at this time, do you want to be the first to write one ? Then click <u>here</u>". And give that a "show region if recordset is empty". This link would go to the same adress as your "write a review" page.
That page can be made simply by using "Insert -> live objects -> Record insertion form".
It's not so hard, if you know how to make nested repeat region you could also show the reviews on the product page the first time user gets there, that's why just showing the titles is easier. But there's nested repeat regions in the tutorial section, there's two right here: www.udzone.com/index.asp?TypeId=2&CatId=180
Happy developing.
With kind regards,
Dennis van Galen
Webmaster KPN Services
Financial and Information Services