Hello,
In the admin create order screen, is there a way to indicate on the search results if an item is locked or hidden?
Thanks
Indicate locked/hidden items in admin create order
Re: Indicate locked/hidden items in admin create order
Hello,
This is something that would need to be customized. By default you can only tell if an item is locked / hidden by viewing the category it is in.
This is something that would need to be customized. By default you can only tell if an item is locked / hidden by viewing the category it is in.
Re: Indicate locked/hidden items in admin create order
I'm fine with customizations, I just don't know what to look for or what to change.
Re: Indicate locked/hidden items in admin create order
Are you interested in see if the product is public, private or hidden? If you're okay with a numerical representation, it's a pretty easy change. Looking at the CreateOrder2.aspx page, look for the FindProductSearchResults gridview control. Inside that control you'll find this code:
Change it to this:
And the search results will display the VisibilityID.
0 = Public
1 = Private
2 = Hidden
If you want the actual words you'll need to create a function in the code behind page that returns the correct text when you pass in the VisibilityID.
The function would look like this:
and the gridview code would change to this:
Is that what you are trying to do? Or hopefully it will at least point you in the right direction.
Code: Select all
<asp:BoundField DataField="Sku" HeaderText="SKU" SortExpression="Sku" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
Code: Select all
<asp:BoundField DataField="Sku" HeaderText="SKU" SortExpression="Sku" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:BoundField DataField="VisibilityId" HeaderText="Visible" SortExpression="VisibilityId" />
0 = Public
1 = Private
2 = Hidden
If you want the actual words you'll need to create a function in the code behind page that returns the correct text when you pass in the VisibilityID.
The function would look like this:
Code: Select all
protected string GetVisible(object dataItem)
{
Product product = (Product)dataItem;
switch (product.VisibilityId)
{
case 0:
return "Public";
case 1:
return "Private";
case 2:
return "Hidden";
default:
return "Unknown";
}
}
Code: Select all
<asp:BoundField DataField="Sku" HeaderText="SKU" SortExpression="Sku" />
<asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
<asp:TemplateField HeaderText="Visible" SortExpression="VisibilityId">
<ItemStyle HorizontalAlign="center" />
<ItemTemplate>
<asp:Label ID="VisibleLabel" runat="server" Text='<%# GetVisible(Container.DataItem) %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Re: Indicate locked/hidden items in admin create order
Thank you! This is exaclty what I needed.
If you want the backstory: We sell pet food. Each bag comes in 3 sizes. Our POS syncs each product to AC, which results in each size of food having its own product. For most foods, I have made a product that puts those 3 sizes as 3 variants and locked the original products. When I search for a food to add to an order, it will be much easier to tell which product to select now.
Again, thanks!
If you want the backstory: We sell pet food. Each bag comes in 3 sizes. Our POS syncs each product to AC, which results in each size of food having its own product. For most foods, I have made a product that puts those 3 sizes as 3 variants and locked the original products. When I search for a food to add to an order, it will be much easier to tell which product to select now.
Again, thanks!
Re: Indicate locked/hidden items in admin create order
Happy to be of assistance!