I can't find a setting or a control for this. I don't mind modifying template files if necessary... I just need to know what control to use in the ProductTemplate.ascx document, if that's how it has to be done.
Thanks!
Please try the the following code snippet in that control:
<div class="ProductInventory"> <div class="ProductHead"> <asp:Label ID="lblQuantityForSaleHeader" runat="server" Text="Quantity For Sale:" /></div> <div class="ProductNormal"> <asp:Label ID="lblQuantityForSale" runat="server" Text='<%#CurrentProduct.Inventory.QuantityForSale.ToString())%>' /> </div> </div>
Let me know how it goes.
Not so hot, I'm afraid... it went like this:
! A critical error has occurred.
[path, etc.]/StandardProductTempalte.ascx (68): error CS1002: ; expected
try this:
<div class="ProductInventory"> <div class="ProductHead"> <asp:Label ID="lblQuantityForSaleHeader" runat="server" Text="Quantity For Sale:" /></div> <div class="ProductNormal"> <asp:Label ID="lblQuantityForSale" runat="server" Text='<%#CurrentProduct.Inventory.QuantityForSale.ToString()%>' /> </div> </div>
That's the one! Thanks a lot, Frank!
Happy to hear that worked.
How would the code need to differ in order to display the remaining inventory for each item on the category page?
<asp:Label ID="lblQuantityForSale" runat="server" Text='<%#((Product) Container.DataItem).Inventory.QuantityForSale.ToString()%>' />
Worked like a charm, Frank. Thanks much.