Add a message to version section if there are no versions

Posted By saturation Thu 4 Aug 2011
Add to Favorites0
Author Message
saturation
 Posted Thu 4 Aug 2011
Supreme Being

Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)Supreme Being - (66,798 reputation)

Group: Forum Members
Last Active: Fri 30 Nov 2012
Posts: 108, Visits: 1,185
I am interested in putting a message into the version section of the product pages (productversion.ascx?) that says something like "this product is not available at this time--please check back soon for updates."  However, I'm not quite sure how to loop through all versions to make sure there are truly no products.

I have my DB setup in a slightly different way.   I am not using quantities.  If there is no "version" for that product, I put "None" into the V_Name field so that I can just hide any buttons where V_Name = "None."  However, I need to put the message up after all versions have been looped through.  Any ideas on how to do this?   I'm not the greatest programmer, but if someone could get me started I can probably take it from there.

Thanks in advance!
Mohammad
 Posted Mon 8 Aug 2011
Kartris Expert

Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)Kartris Expert - (80,893 reputation)

Group: Administrators
Last Active: Sun 27 Sep 2015
Posts: 115, Visits: 706
Use the below code to loop through all versions, and check the version's name in a given product:


Dim blnAvailable As Boolean = False
Dim numProductID As Integer '' Need to assign product id here
Dim dtVersions as DataTable = VersionsBLL.GetByProduct(ProductID, Session("LANG"), 0)
For Each rw as DataRow in dtVersions.Rows
      If LCase(rw("V_Name")) <> "none" Then
           blnAvailable = True
           Exit For
      End If
Next


Then you need to check for the variable blnAvailable to decide either to display the message or not.

Is that what you are looking for ?

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top