Rank: Member
Joined: 4/6/2006(UTC) Posts: 27
|
I have a shopping cart that is a host to 3 different brand names. I use the custom affiliate theme to generate a different look for each brand. So when a customer comes in on one brand's affid it shows them that brand's theme and if a customer comes in on a different brand's affid it shows them that brand's theme. This works fairly well except for when you switch brands. So if a customer comes to the shopping cart for the first time on brand #1's affid they see brand #1's theme. Now if the customer comes to the shopping cart again on brand #2's affid they still see brand #1's theme initially. If they refresh the page or navigate to a different shopping cart page the shopping cart then takes on brand #2's theme. Is there any way to have the customer see brand #2's theme immediately instead of having to do a refresh of some sort?
|
|
|
|
Rank: Member
Joined: 11/5/2003(UTC) Posts: 1,786
|
This is caused by the fact that the customer is already linked to an affiliate from their first visit. It would require some custom code to redirect immediately after they visit the site to reset the affiliate id linked with their account.
|
|
|
|
Rank: Member
Joined: 4/6/2006(UTC) Posts: 27
|
Anyone out there know what that custom code might be? =)
|
|
|
|
Rank: Member
Joined: 4/6/2006(UTC) Posts: 27
|
For anyone who might be interested I figured out a solution to my problem.
I modded BaseStorePage.vb.
Replace:
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init If Not Request.Params(WebAppSettings.AffiliateQueryStringName) Is Nothing Then Dim affid As String = String.Empty Try affid = Request.Params(WebAppSettings.AffiliateQueryStringName) Contacts.Affiliate.RecordReferral(affid) Catch ex As Exception EventLog.LogEvent("BaseStorePage - Page_Init", "Error loading affiliate " & ex.Message, Metrics.EventLogSeverity.Warning) End Try End If End Sub
With:
Private Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init If Not Request.Params(WebAppSettings.AffiliateQueryStringName) Is Nothing Then Dim affid As String = String.Empty Try affid = Request.Params(WebAppSettings.AffiliateQueryStringName) Contacts.Affiliate.RecordReferral(affid) If Session("NewSession") Is Nothing Or Session("NewSession") <> affid Then Session("NewSession") = affid Response.Redirect(Page.Request.Url.ToString()) End If Catch ex As Exception EventLog.LogEvent("BaseStorePage - Page_Init", "Error loading affiliate " & ex.Message, Metrics.EventLogSeverity.Warning) End Try End If End Sub
|
|
|
|
Rank: Member
Joined: 6/6/2005(UTC) Posts: 483
|
Would it still show the wrong first theme if you have your affiliate conflict set to newest and your referral days set to zero?
Bob Noble
|
|
|
|
Rank: Member
Joined: 10/29/2008(UTC) Posts: 66
|
Is this solution viable for SP 3.2?
I tried to do the fix listed by jwilliams below and had no luck, just errors.
Has anyone had success with this?
|
|
|
|
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.