Page 1 of 1
Products by manufactuer control
Posted: Tue Dec 02, 2008 6:29 am
by mazhar
ProductsByManufacturer control lists the products by there manufacturer. In order to install the control extract the attached zip file and place the user control files in
ConLib folder then use it like any other
ConLib control on store pages.
Re: Products by manufactuer control
Posted: Tue Dec 02, 2008 10:08 am
by Tomgard
Thank you for posting this. For SEO purposes it would be better to list all manufactures and hyperlink them to the product listing. A manufacturer site map of sorts.
Re: Products by manufactuer control
Posted: Tue Dec 02, 2008 1:01 pm
by mazhar
It could be done easily, all you need is to send the vendor id to the listing page. The listing page will list the products by extracting the vendorid from encoded url.
Re: Products by manufactuer control
Posted: Mon Dec 22, 2008 5:55 am
by mazhar
Thank you for posting this. For SEO purposes it would be better to list all manufactures and hyperlink them to the product listing. A manufacturer site map of sorts.
Check the following post
viewtopic.php?f=47&t=9343
Re: Products by manufactuer control
Posted: Fri May 29, 2009 12:40 pm
by Willisski
dumb question... In your screen shot you have an image of a manufacturers drop down. I have installed the controls but I am unable to find that drop down. Could you point me in the right direction?
Greg
Thanks for any help you can give me..
Re: Products by manufactuer control
Posted: Sat May 30, 2009 2:36 am
by mazhar
I just installed the component and dropdown is there as shown in screen capture. Do you have some customization in control file?
Re: Products by manufactuer control
Posted: Sun May 31, 2009 8:42 am
by Willisski
For whatever reason the
The drop down is showing up now I have no idea what I did before... something Screwy for sure..
However now when I sort by anything on the page i get
The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
Do you have any suggestions?
Ps is there a way to suppress manufacturers that currently do not have products
Greg
Re: Products by manufactuer control
Posted: Mon Jun 01, 2009 5:12 am
by mazhar
The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NotSupportedException: The data source 'ProductDS' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.
Edit the file and locate following code block
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource">
and change it as below
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource" SortParameterName="sortExpression">
Do you have any suggestions?
Ps is there a way to suppress manufacturers that currently do not have products
For this locate
Code: Select all
<asp:DropDownList ID="ManufacturersList" runat="server" AppendDataBoundItems="True"
DataSourceID="ManufacturerDs" DataTextField="Name"
DataValueField="ManufacturerId" AutoPostBack="true">
and change it as below
Code: Select all
<asp:DropDownList ID="ManufacturersList" runat="server" AppendDataBoundItems="True"
DataSourceID="ManufacturerDs" DataTextField="Name"
DataValueField="ManufacturerId" AutoPostBack="true"
onprerender="ManufacturersList_PreRender">
Now finally add following method to code file
Code: Select all
protected void ManufacturersList_PreRender(object sender, EventArgs e)
{
foreach (ListItem listItem in ManufacturersList.Items)
{
int manufacturerId = AlwaysConvert.ToInt(listItem.Value);
if (manufacturerId > 0)
{
bool enabled = (ProductDataSource.CountForManufacturer(manufacturerId) > 0);
listItem.Enabled = enabled;
}
}
}