Page 1 of 1
adding product summary to category grid
Posted: Mon Sep 08, 2008 1:29 pm
by mkeith1
I didn't see a post on adding the product summary field to any of the category grid pages. I've tried changing the contents of the page using each of the category grids, but it doesn't appear.
Summary doesn't appear on Product 1, or product1 with options grid either. Is there any page that Product "Summary" will appear on?
Re: adding product summary to category grid
Posted: Mon Sep 08, 2008 3:26 pm
by jmestep
It can be added to category conlibs. Which one are you wanting to add it to?
You could add it to product page also, code would depend on where you wanted to put it.If you add it to scriplets/content/ Show Product.htm, it would be something like
$Product.Summary
Re: adding product summary to category grid
Posted: Mon Sep 08, 2008 4:58 pm
by mkeith1
I'd like to add it to CategoryGridPage2.ascs and i'm guessing Product.aspx (the content says Show Product 1)
Re: adding product summary to category grid
Posted: Mon Sep 08, 2008 5:57 pm
by jmestep
This should work on Show Product 1.htm
$Product.Summary
On CategoryGrid2.ascx.cs, this would put it right under the product rating -- last two lines are the new code:
Code: Select all
//OUTPUT RATING
if (Token.Instance.Store.Settings.ProductReviewEnabled != CommerceBuilder.Users.UserAuthFilter.None)
{
itemTemplate2.Controls.Add(new LiteralControl(string.Format("<br /><img src=\"{0}\" />", NavigationHelper.GetRatingImage(product.Rating))));
}
itemTemplate2.Controls.Add(new LiteralControl("<br/>"));
itemTemplate2.Controls.Add(new LiteralControl(product.Summary));
Re: adding product summary to category grid
Posted: Thu Sep 11, 2008 3:20 pm
by mkeith1
This should work on Show Product 1.htm
$Product.Summary
I've changed the category page, but i don't see where i should place the following:
"$Product.Summary"
there isn't a page called product 1.htm.
i've added this as per above
itemTemplate2.Controls.Add(new LiteralControl("<br/>"));
itemTemplate2.Controls.Add(new LiteralControl(product.Summary));
to CategoryGrid2.ascx.cs
Re: adding product summary to category grid
Posted: Fri Sep 12, 2008 12:39 am
by mazhar
You have to place the
code line in
Website/App_Data/Scriptlets/Default/Contents/Show Product1.htm
Re: adding product summary to category grid
Posted: Fri Sep 12, 2008 7:48 pm
by sohaib
Recommended Good Practice
Please avoid using scriptlets for display purposes. Use them only to control the layouts.
To change what is displayed on the page customize the corresponding conlib controls.
Re: adding product summary to category grid
Posted: Tue Sep 16, 2008 3:54 pm
by mkeith1
sohaib wrote:Recommended Good Practice
Please avoid using scriptlets for display purposes. Use them only to control the layouts.
To change what is displayed on the page customize the corresponding conlib controls.
OK, on a different note, is "summary" supposed to be a field that a customer can view? or is that field for only the merchant to view when editing/viewing a product on the merchant side. Should what i'm typing in that field go in the "Description" field, and what's in that field be moved to the "More Description" Field?, because that would also solve the problem.
Re: adding product summary to category grid
Posted: Tue Sep 16, 2008 9:01 pm
by mazhar
You can go with any of them.
Re: adding product summary to category grid
Posted: Wed Sep 17, 2008 3:41 pm
by jmestep
Summary is supposed to be a field for the customer to view, but it was mostly used on the category display pages as a short blurb, then the other two description fields display on the product pages.
Re: adding product summary to category grid
Posted: Mon Sep 22, 2008 10:55 am
by mkeith1
Which category page does "Summary" show up on by default (without adding code manually)?
Re: adding product summary to category grid
Posted: Mon Sep 22, 2008 1:00 pm
by jmestep
CategoryGridPage4.ascx.cs
Re: adding product summary to category grid
Posted: Mon Sep 22, 2008 7:32 pm
by Tomgard
Can I add this same code to [[ConLib:CategoryGridPage]] and show a product summary?
Re: adding product summary to category grid
Posted: Tue Sep 23, 2008 8:23 am
by jmestep
You should be able to-I've added it in other places. You might have to change the
itemTemplate1.Controls.Add(new LiteralControl(catalogNode.Summary));
to itemTemplate2 .......
depending on where you want to display it.