Page 1 of 1
Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Sun Jun 14, 2009 2:45 pm
by ZLA
I just started looking at Wishlist functionality and got a few surprises. I'd appreciate any input about the following:
- Why are wishlists public by default? I can't imagine researching a computer online and having that wishlist information be publicly accessible.
- Is there a built in way to make wishlists private by default? I could assign a random password on creation. But I don't want to display it to the user. I can make it so it isn't loaded on page load but then I'll need a way to show it in case they do want to email the wishlist.
- From ac_Wishlists, it looks like you could set up multiple wishlists with different names. Is this feature built in or is the table schema just for customization / future implementation?
- Once again, a list of product information needs customization to hide custom system product template fields from the user. Has anyone put together a list of all the places product template fields, basket item inputs, order item inputs (and now wishlist item inputs) appear in the system? Is there any chance AC 7.0.4 will have a Visibility Flag for product template fields?
Regards.
How to hide wishlist item inputs
Posted: Sun Jun 14, 2009 9:09 pm
by ZLA
Here's one way to hide Wishlist Item Inputs from MyWishlist.ascx. Please let me know if there was something simpler I could have done.
In the MyWishlistPage.ascx (or your customized copy), add the following to the WishListGrid declaration:
Code: Select all
OnRowDataBound="WishlistGrid_RowDataBound"
and remove the DataSource from the InputList DataList declaration. Change
Code: Select all
<asp:DataList ID="InputList" runat="server" DataSource='<%#Eval("Inputs") %>'>
to
Code: Select all
<asp:DataList ID="InputList" runat="server">
In the code behind (ConLib/MyWishlistPage.ascx.cs or your customized copy) add:
Code: Select all
// SG Customization - ZLA 2009-06-14
protected void WishlistGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataList inputList = e.Row.FindControl("InputList") as DataList;
inputList.ItemDataBound += new DataListItemEventHandler(InputList_ItemDataBound);
inputList.DataSource = (e.Row.DataItem as CommerceBuilder.Users.WishlistItem).Inputs;
inputList.DataBind();
}
}
protected void InputList_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
{
string inputName = (e.Item.DataItem as CommerceBuilder.Users.WishlistItemInput).InputField.Name;
// DataList Visible property doesn't work. If RepeatLayout = Flow, then text is not displayed but <BR /> is inserted.
e.Item.Visible = (!inputName.StartsWith("Regex") && inputName.Replace(" ", "") != "RequiredFieldsList"
&& !inputName.StartsWith("SG_"));
if (!e.Item.Visible)
{
// Hide row and prevent user from seeing hidden text
e.Item.CssClass = "HiddenPanel";
(e.Item.FindControl("InputName") as Label).Text = "";
(e.Item.FindControl("InputValue") as Label).Text = "";
}
}
}
// SG End Customization - ZLA 2009-06-14
Please note that this also applies to ViewWishListPage.ascx.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Mon Jun 15, 2009 4:09 am
by jmestep
Wishlists being public- a customer can set a password for their wishlist.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Mon Jun 15, 2009 7:55 am
by ZLA
True, but only if the customer reads the Wishlist Password info. It just seems backward to me that the list is public by default.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Tue Jun 16, 2009 8:56 am
by ZLA
ZLA wrote:
- From ac_Wishlists, it looks like you could set up multiple wishlists with different names. Is this feature built in or is the table schema just for customization / future implementation?
I'm still curious about this point. Can someone explain the purpose of the name column in this table?
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Tue Jun 16, 2009 9:21 am
by mazhar
Yes back end do support multiple wishlists per customer.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Tue Jun 16, 2009 9:30 am
by ZLA
mazhar wrote:Yes back end do support multiple wishlists per customer.
But to implement would require front end customization?
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Tue Jun 16, 2009 9:42 am
by mazhar
Yes, you need to adjust front end to utilize this.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Tue Aug 18, 2009 9:04 pm
by sfeher
mazhar --
I'd be interested to know how this has worked.... do you have any examples of this in place?
We have a project where this would be exceptionally helpful.
Thanks,
Steve
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Wed Aug 19, 2009 1:42 am
by mazhar
Sorry currently I am not aware of any in place example for this. You can put some time figure it out via inspecting respective database table relations.
Re: Wishlist Questions: Privacy, Item Inputs, Multiple Lists
Posted: Wed Aug 19, 2009 4:39 am
by AbleMods
You can secure wishlists alot easier just by editing the web.config in ~/Members/.
Just remove the entire <Location> XML tag set.
Original file:
Code: Select all
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
<location path="MyWishlist.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
</configuration>
Change it to this:
Code: Select all
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</configuration>