REmove Manufacturers as a search option
-
- Ensign (ENS)
- Posts: 16
- Joined: Mon Apr 28, 2008 9:58 am
REmove Manufacturers as a search option
I have a client who wants to remove the search by Manufacturer option. Any ideas?
Re: REmove Manufacturers as a search option
Lets for example you can remove the manufacturers search option from the Advacne Search Page by first removing the manufactures dropdown list and data source form the AdvanceSearchPages.ascx and then setting the default value for ManufactureId parameter to 0.
For example on the AdvanceSearchPage.ascx file locate and comment out following two blocks of code
and then locate the following line of code
and make it look like
For example on the AdvanceSearchPage.ascx file locate and comment out following two blocks of code
Code: Select all
<%--<asp:DropDownList ID="ManufacturerList" runat="server" AppendDataBoundItems="True"
DataSourceID="ManufacturerDs" DataTextField="Name" DataValueField="ManufacturerId">
<asp:ListItem Text="- Any Manufacturer -" Value="0"></asp:ListItem>
</asp:DropDownList>--%>
and
<%--<asp:ObjectDataSource ID="ManufacturerDs" runat="server" OldValuesParameterFormatString="original_{0}"
SelectMethod="LoadForStore" TypeName="CommerceBuilder.Products.ManufacturerDataSource">
<SelectParameters>
<asp:Parameter Name="sortExpression" DefaultValue="Name" />
</SelectParameters>
</asp:ObjectDataSource>--%>
Code: Select all
<asp:ControlParameter Name="manufacturerId" Type="Int32" ControlID="ManufacturerList" PropertyName="SelectedValue" />
Code: Select all
<asp:Parameter Name="manufacturerId" Type="Int32" DefaultValue="0" />
- compunerdy
- Admiral (ADM)
- Posts: 1283
- Joined: Sun Nov 18, 2007 3:55 pm
Re: REmove Manufacturers as a search option
I like to use the manufacturer field but I did not want is displayed to customers. Here are the files I had to edit to remove it.
Edit <conlibs> searchpage.ascx and .cs/categorysearchsidebar.ascx and .cs/categorygridpage.ascx and .cs to not display manufacturer info.
Hope that helps.
Edit <conlibs> searchpage.ascx and .cs/categorysearchsidebar.ascx and .cs/categorygridpage.ascx and .cs to not display manufacturer info.
Hope that helps.
-
- Ensign (ENS)
- Posts: 16
- Joined: Mon Apr 28, 2008 9:58 am
Re: REmove Manufacturers as a search option
Great! This worked just fine. Thanks a bunch.
Re: REmove Manufacturers as a search option
How can I remove the manufacturer column from the search results on the advanced search also? I've commented out all the sections that pertain to choosing a manufacturer but I don't even want the column in the results. Everytime I try to remove it and comment out the c# code that mentions manufacturer I get:
Our store doesn't use a manufacturer (98% of the time we are the manufacturer in a round about sort of way) and in the 2-3 years it has been running I've never used it. And since I'm transitioning from storefront software to AbleCommerce I don't forsee us using it. I can always add it back if needed.
Thanks,
Dappy
Code: Select all
Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
Thanks,
Dappy
Re: REmove Manufacturers as a search option
Find the following code in AdvanceSearchPage.ascx file
and comment it out like below
Code: Select all
<asp:TemplateField HeaderText="Manufacturer" SortExpression="Manufacturer">
<ItemTemplate>
<asp:Label ID="Manufacturer" runat="server" Text='<%#GetManufacturerLink((int)Eval("ManufacturerId"))%>'
></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Code: Select all
<%--<asp:TemplateField HeaderText="Manufacturer" SortExpression="Manufacturer">
<ItemTemplate>
<asp:Label ID="Manufacturer" runat="server" Text='<%#GetManufacturerLink((int)Eval("ManufacturerId"))%>'
></asp:Label>
</ItemTemplate>
</asp:TemplateField>--%>
- jmestep
- AbleCommerce Angel
- Posts: 8164
- Joined: Sun Feb 29, 2004 8:04 pm
- Location: Dayton, OH
- Contact:
Re: REmove Manufacturers as a search option
dappy2- I occasionally get that error when I'm editing something that has code in it where paramters were passed, like the search page. If I go to another page, then go back to it, it is usually OK.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx
Re: REmove Manufacturers as a search option
Thanks - that worked. But i had commented that section out before and was getting the error like jmstep said.
Works now.
Works now.