Code: Select all
[[ConLib:ProductsByManufacturer]]
Code: Select all
[[ConLib:ProductsByManufacturer]]
Check the following postThank 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.
Do you have any suggestions?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 blockThe 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.
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource">
Code: Select all
<asp:ObjectDataSource ID="ProductDS" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="AdvancedSearch" TypeName="CommerceBuilder.Products.ProductDataSource" SortParameterName="sortExpression">
For this locateDo you have any suggestions?
Ps is there a way to suppress manufacturers that currently do not have products
Code: Select all
<asp:DropDownList ID="ManufacturersList" runat="server" AppendDataBoundItems="True"
DataSourceID="ManufacturerDs" DataTextField="Name"
DataValueField="ManufacturerId" AutoPostBack="true">
Code: Select all
<asp:DropDownList ID="ManufacturersList" runat="server" AppendDataBoundItems="True"
DataSourceID="ManufacturerDs" DataTextField="Name"
DataValueField="ManufacturerId" AutoPostBack="true"
onprerender="ManufacturersList_PreRender">
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;
}
}
}