in

dashCommerce

An ASP.NET Open Source e-Commerce Application

Ads are disappearing!

Last post 09-26-2008 6:16 AM by SoeurSourire. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 03-11-2008 9:46 PM

    Ads are disappearing!

     I am using version 2.2 VB. Everything seems fine but when I edit an existing ad that came with the test catalog it dissappears! If I create a new one it never shows up! I get no errors. I have tried Firefox and IE. The server is running on the Vista OS. Any help would be great. I can't go live with the site until I can get the ads working on the main page. Thanks!

  • 09-26-2008 6:16 AM In reply to

    Re: Ads are disappearing!

    Maybe too late for you, but it might be of use for other users... The VB version has a bug in :
    	Protected Function FormatDblClick(ByVal adId As Object) As String
    'INSTANT VB NOTE: The local variable AdId was renamed since Visual Basic will not uniquely identify local variables when other local variables have the same name:
    		Dim AdId_Renamed As String = adId.ToString()
    		Dim location As String = String.Empty
            location = "showPopWin('admin/content_ad_editor.aspx?id=" & AdId_Renamed & "&pn=" & PageName & "&pl=" & BoxPlacement & "', 650, 600, null)"
    		Return location
    	End Function
    
    	Protected Sub FormatAddAnAdURL()
    		Dim location As String = String.Empty
    		If (Not CanEdit) Then
    			addAnAd.Visible = False
            Else
                location = "showPopWin('admin/content_ad_editor.aspx?pn=" & PageName & "&pl=" & BoxPlacement & "', 650, 650, null)"
                addAnAd.Attributes("onclick") = location
                addAnAd.Visible = True
    		End If
    	End Sub
    
    It should be :
    	Protected Function FormatDblClick(ByVal adId As Object) As String
    'INSTANT VB NOTE: The local variable AdId was renamed since Visual Basic will not uniquely identify local variables when other local variables have the same name:
    		Dim AdId_Renamed As String = adId.ToString()
    		Dim location As String = String.Empty
            location = "showPopWin('admin/content_ad_editor.aspx?id=" & AdId_Renamed & "&pn=" & PageName & "&pl=" & BoxPlacement.ToString() & "', 650, 600, null)"
    		Return location
    	End Function
    
    	Protected Sub FormatAddAnAdURL()
    		Dim location As String = String.Empty
    		If (Not CanEdit) Then
    			addAnAd.Visible = False
            Else
                location = "showPopWin('admin/content_ad_editor.aspx?pn=" & PageName & "&pl=" & BoxPlacement.ToString() & "', 650, 650, null)"
                addAnAd.Attributes("onclick") = location
                addAnAd.Visible = True
    		End If
    	End Sub
    
    
    So if you change BoxPlacement to BoxPlacement.ToString the exact string gets stored in the database instead of the numeric position in the enum
Page 1 of 1 (2 items)