Add Wishlist button on products displayed in the Category pages, "Products in Grid"

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Anyone know which pages to modify so I can have the "Add to Wishlist" button show up when the product category is clicked on and the products show on the webpage. The category is using "Products in Grid"

When the products displays it shows:

1. Image
2. Short Descripton
3. Details Button
4. Add to Cart

I would like to have 5. Add to Wish List...

Any help is appreciated.
13 years ago
It needs some customization. Look at \Templates\Categories\ProductsInGrid.ascx control
13 years ago
Looks like the ProductBox1.ascx and  ProductBox1.ascx.cs are the files that need to be modified.

The code below is from ProductVariantsInGrid.ascx

Is it possible to re-use this code in some way for what I am looking for? I am not a programmer so if you guys are not able to help walk me through this  I will get a guy I know who is a programmer to change the page, no worries, just thought I would try on this forum first while the guy I know is on vacation.




if (e.CommandName == "AddToWishlist")
                    {
                        var addToCartWarnings = ShoppingCartManager.AddToCart(ShoppingCartTypeEnum.Wishlist,
                            pv.ProductVariantID, attributes, quantity);
                        if (addToCartWarnings.Count == 0)
                        {
                            Response.Redirect("~/Wishlist.aspx");
                        }
                        else
                        {
                            var addToCartWarningsSb = new StringBuilder();
                            for (int i = 0; i < addToCartWarnings.Count; i++)
                            {
                                addToCartWarningsSb.Append(Server.HtmlEncode(addToCartWarnings[i]));
                                if (i != addToCartWarnings.Count - 1)
                                {
                                    addToCartWarningsSb.Append("<br />");
                                }
                            }
                            lblError.Text = addToCartWarningsSb.ToString();
                        }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.