Customer Reviews Add-on by Stokes Web Development
Global.asax.vb Modification
Previous Top Next

The Customer Review Add-on includes the powerful feature to automatically email customers X days after they place an order to remind them to review the products they purchased.  In order to do this, the Global.asax.vb file needs to be modified.

Note: Do not complete this step until the Customer Review Add-on is fully installed, tested and working the way you wish.  Once you complete the steps outlined below, email reminders will immediately begin to start so you want to make sure everything else is working first.  The below code is only needed for the reminder emails.

Open your global.asax.vb file.

Find the following line of code:
  
Public cctimer As Timer

After that line of code add the code below in red:
  
Public cctimer As Timer
'*** New Code by www.stokesweb.com copyright 2008 Stokes Web Development
    Public RevEmailTimer As Timer
'*** End New Code

Then find the following line of code:
  
cctimer = New Timer(timerdelegate, Nothing, 0, period)

After that line of code add the code below in red:
  
cctimer = New Timer(timerdelegate, Nothing, 0, period)
'*** New Code by www.stokesweb.com copyright 2008 Stokes Web Development
        Dim RevSchedule As New swReviews.ReviewScheduledEmails
        Dim Revtimerdelegate As TimerCallback = AddressOf RevSchedule.ScheduledEmails
        RevEmailTimer = New Timer(Revtimerdelegate, Nothing, 0, 24 * 3600000)
'*** End New Code

Save the file and then recompile your website by loading the compilesite.aspx page in a browser window (or whatever page you normally use to compile the site) and make sure you get a clean compile.  A clean compile will look like this:

Clean Compile
 
If you have any additional text shown then there were errors. Do not proceed until these errors have been corrected and you get a clean compile.

If your site has a ssl/bin folder, copy the bin/storefront.dll file and paste it into that folder.

 
 Next Step: Customization - Review Rating Control

 See Also: Customization - Emails


Copyright © 2008 by Stokes Web Development.  All Rights Reserved.