We have a lot of items that are constantly being worked on, but should not be available to our sales people when they are placing an order through the Admin. (They are set to Private)
1) Would anyone have some simple code that would hide Private items from being displayed in CreateOrder2.aspx?
Preferably this would be overridable with a drop-down box, with the default set not to show Private items.
2) Or it may be easier to display an icon next to Private item lines in CreateOrder2.aspx, but #1 above would be cleaner to the end-user.
Using 7.0.3
Hide Private items in CreateOrder2.aspx
-
- Commander (CMDR)
- Posts: 182
- Joined: Mon Oct 10, 2005 6:27 pm
Re: Hide Private items in CreateOrder2.aspx
Here is a small mod, this will show the visibility of each item next to other information in product grid on createorder2.aspx. Edit Wrebsite/Admin/Orders/Create/CreateOrder2.aspx file and locate following code block
and then replace it with
save the file and test again. It should now show the visibility info on page.
Code: Select all
<asp:TemplateField HeaderText="Price" SortExpression="Price">
<ItemStyle HorizontalAlign="right" Width="80px" />
<ItemTemplate>
<uc:ProductPrice ID="ProductPrice1" runat="server" Product='<%#Container.DataItem%>' />
</ItemTemplate>
</asp:TemplateField>
Code: Select all
<asp:TemplateField HeaderText="Price" SortExpression="Price">
<ItemStyle HorizontalAlign="right" Width="80px" />
<ItemTemplate>
<uc:ProductPrice ID="ProductPrice1" runat="server" Product='<%#Container.DataItem%>' />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Visibility" SortExpression="VisibilityId">
<ItemStyle HorizontalAlign="Center" />
<ItemTemplate>
<%#((CommerceBuilder.Catalog.CatalogVisibility)Eval("VisibilityId")).ToString()%>
</ItemTemplate>
</asp:TemplateField>
-
- Commander (CMDR)
- Posts: 182
- Joined: Mon Oct 10, 2005 6:27 pm
Re: Hide Private items in CreateOrder2.aspx
Thanks, that works and shows Public or Private in a new column on the right hand side.
How can the code be modified to show the AddButton if it is Public, and nothing if it is not Public in that same column on the right side?
How can the code be modified to show the AddButton if it is Public, and nothing if it is not Public in that same column on the right side?
Re: Hide Private items in CreateOrder2.aspx
Locate following code
and replace it with following
Code: Select all
<asp:TemplateField>
<ItemStyle Width="50px" HorizontalAlign="center" />
<ItemTemplate>
<asp:ImageButton ID="AddButton" runat="server" CommandName="Add" CommandArgument='<%#Eval("ProductId")%>' SkinID="AddIcon"/>
</ItemTemplate>
</asp:TemplateField>
Code: Select all
<asp:TemplateField>
<ItemStyle Width="50px" HorizontalAlign="center" />
<ItemTemplate>
<asp:ImageButton ID="AddButton" runat="server" CommandName="Add" CommandArgument='<%#Eval("ProductId")%>' SkinID="AddIcon" Visible='<%#((CommerceBuilder.Catalog.CatalogVisibility)Eval("VisibilityId")) == CommerceBuilder.Catalog.CatalogVisibility.Public%>' />
</ItemTemplate>
</asp:TemplateField>