BV Commerce Forum
»
BV Commerce Support
»
General Support
»
5.4 Bug, Analytics Config page never implemented!
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
I just upgraded to 5.4 and for some reason the analytics config page is there, but there is nothing in the code behind?
I couldnt figure out why it wouldnt save my settings...
EDIT:
Has anyone else noticed this?
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
You are correct. There is a bug in that the settings do not get saved.
I wonder if there are any new features in 5.4 that do work? JK:)
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
well, kitting seems to work so far for me...however when i try to compile the website in VS.NET 2008 it gives me an error about kitting groups. Not sure what thats about and i havent had a chance to look into it yet.
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
Marcus, any idea when the Analytics might be fixed?
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
Here's the code that was dropped from the shipping version (rev. 4). I'll put out an official update shortly. Code: Imports BVSoftware.Bvc5.Core
Partial Class BVAdmin_Configuration_Analytics Inherits BaseAdminPage
Protected Sub Page_PreInit1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit Me.PageTitle = "Analytics Settings" Me.CurrentTab = AdminTabType.Configuration ValidateCurrentUserHasPermission(Membership.SystemPermissions.SettingsView) End Sub
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then If Membership.UserAccount.DoesUserHavePermission(SessionManager.GetCurrentUserId, Membership.SystemPermissions.SettingsEdit) = False Then Me.btnSave.Enabled = False End If
' Loading Me.chkGoogleAdwords.Checked = WebAppSettings.AnalyticsUseGoogleAdwords Me.GoogleAdwordsConversionIdField.Text = WebAppSettings.AnalyticsGoogleAdwordsConversionId Me.GoogleAdwordsLabelField.Text = WebAppSettings.AnalyticsGoogleAdwordsConversionLabel Me.GoogleAdwordsBackgroundColorField.Text = WebAppSettings.AnalyticsGoogleAdwordsBackgroundColor
Me.chkGoogleEcommerce.Checked = WebAppSettings.AnalyticsUseGoogleEcommerce Me.GoogleEcommerceCategoryNameField.Text = WebAppSettings.AnalyticsGoogleEcommerceCategory Me.GoogleEcommerceStoreNameField.Text = WebAppSettings.AnalyticsGoogleEcommerceStoreName
Me.chkGoogleTracker.Checked = WebAppSettings.AnalyticsUseGoogleTracker Me.GoogleTrackingIdField.Text = WebAppSettings.AnalyticsGoogleTrackingId
Me.chkYahoo.Checked = WebAppSettings.AnalyticsUseYahoo Me.YahooAccountIdField.Text = WebAppSettings.AnalyticsYahooAccountId
End If End Sub
Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnSave.Click
WebAppSettings.AnalyticsUseGoogleAdwords = Me.chkGoogleAdwords.Checked WebAppSettings.AnalyticsGoogleAdwordsConversionId = Me.GoogleAdwordsConversionIdField.Text WebAppSettings.AnalyticsGoogleAdwordsConversionLabel = Me.GoogleAdwordsLabelField.Text WebAppSettings.AnalyticsGoogleAdwordsBackgroundColor = Me.GoogleAdwordsBackgroundColorField.Text
WebAppSettings.AnalyticsUseGoogleEcommerce = Me.chkGoogleEcommerce.Checked WebAppSettings.AnalyticsGoogleEcommerceCategory = Me.GoogleEcommerceCategoryNameField.Text WebAppSettings.AnalyticsGoogleEcommerceStoreName = Me.GoogleEcommerceStoreNameField.Text
WebAppSettings.AnalyticsUseGoogleTracker = Me.chkGoogleTracker.Checked WebAppSettings.AnalyticsGoogleTrackingId = Me.GoogleTrackingIdField.Text
WebAppSettings.AnalyticsUseYahoo = Me.chkYahoo.Checked WebAppSettings.AnalyticsYahooAccountId = Me.YahooAccountIdField.Text
Me.MessageBox1.ShowOk("Settings Saved!")
End Sub
End Class
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
Thanks for the code marcus,
however there is another bug. In the Receipt.aspx page.
[2]CType[/2][2]"AnalyticsTags1"[/2][2]), BVModules_Controls_AnalyticsTags) in the RenderAnalytics method.</P>[/2]Its never finding this control. It is in my Checkout.master file for my theme too...it spitting out the tracking code, but not the ECOMMERCE tracking code :(
Thanks Ryan
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
OK,
Well changing line 42 in Receipt.aspx.vb from this
a1 = CType(Page.FindControl("AnalyticsTags1"), BVModules_Controls_AnalyticsTags)
to this
[2]Dim[/2][2]As[/2][2]CType[/2][2]Me[/2][2]"EndOfForm"[/2][2]CType[/2][2]"AnalyticsTags1"[/2][2]), BVModules_Controls_AnalyticsTags)</P>[/2]
Solves the problem and it spits out the tracking code now :)
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Looks like 'RenderAnalytics(o)' on line 32 of Receipt.aspx.vb is generating an error too
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
If you modify the code to whats in my previous post, it will fix that. its the same error.
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Sorry, Even with Marcus' updated code and your fix I get the following: <H1>Server Error in '/' Application. <HR width="100%" color=silver SIZE=1> </H1> <H2>Object reference not set to an instance of an object. </H2>[color=#ffffcc>
[tr ][td ]<CODE> Line]Line 42: Dim c As ContentPlaceHolder = CType(Me.Master.FindControl("EndOfForm"), ContentPlaceHolder) Line 43: a1 = CType(c.FindControl("AnalyticsTags1"), BVModules_Controls_AnalyticsTags) [/color]Line 44: If a1 IsNot Nothing Then Line 45: </PRE>[/code][/td][/tr]</TABLE>
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
Did you update your Checkout.master in your theme file to include the AnalyticsTags control? Checkout the new Tek theme *.master pages that are included for an example.
<%@ Register src="../../Controls/AnalyticsTags.ascx" tagname="AnalyticsTags" tagprefix="uc4" %>
and
<asp:ContentPlaceHolder ID="EndOfForm" runat="Server"> <uc4:AnalyticsTags ID="AnalyticsTags1" runat="server" /> </asp:ContentPlaceHolder>
need to be added to all your master pages. I just looked at each master page in the new tek theme to find new additions, and added this to each of my corresponding master pages.
|
|
|
|
Rank: Member
Joined: 12/19/2006(UTC) Posts: 153
|
Doh!
Had it in the contentplaceholder id="content" not id="endofform"
No error now... thanks for holding my hand through it:)
|
|
|
|
Rank: Member
Joined: 2/6/2008(UTC) Posts: 55
|
No problem :)
I know it get can be frustrating at times. This is one of the reasons i wont buy an ecommerce app that doesn't give source. I always end up fixing their code!
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.