I've seen a few sites offering automatic discounts if users are registered using *@something.edu email address. I was wondering if its possible to do something similar with ASPDNSF?
Thanks
Using MS 9.1.0.1
I've seen a few sites offering automatic discounts if users are registered using *@something.edu email address. I was wondering if its possible to do something similar with ASPDNSF?
Thanks
Using MS 9.1.0.1
Not done this before, but I would imagine one way to achieve this would be through customer levels and automatically assigning them those levels when they register. To perform this automatically I would put a trigger on the customer table to detect a registration, match their domain and update their customerlevelid.
http://www.esedirect.co.uk
--------------------------------------------------------------------------
Using MS 9.2.0.0 with the following customisations:
Lightbox/Fancybox enlarged images;
Auto-suggest searchbox;
Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
Failed transactions emailed via trigger;
Custom app to show basket contents when customer online;
Orders pushed through to accounting systems.
All the above without source!
Hi esedirect,
Thanks for your suggestion. I was also thinking that customer levels are probably the way to go but didn't know how a customer would be automatically added. My experience with SQL is very basic... I'll try to look up SQL Triggers. Would I need access to full source code to do this or is this something that can be accomplished without access to the full code?
No you don't need source code. The beauty of this suggestion is that it works on the database and not through .Net code. Some people find triggers confusing, but this is quit a simple solution so shouldn't be a problem.
This trigger will work on customer records only when they are being inserted/updated, that's the "AFTER INSERT, UPDATE" clause. And since there is the "IF UPDATE(IsRegistered)" test, it only acts on the customer record when IsRegistered is being changed.Code:SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TRIGGER [dbo].[tr_Customer] ON [dbo].[Customer] WITH EXECUTE AS CALLER AFTER INSERT, UPDATE AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Do something if the customer actually registers IF UPDATE(IsRegistered) BEGIN -- your code here UPDATE Customer SET CustomerLevelID=x FROM inserted AS i WHERE [Customer].[CustomerID] = [i].[CustomerID] AND [i].[IsRegistered] = 1 AND [i].[Email] LIKE '%.edu' END END
I've given an example of what you might want within test, which will need to be enhanced by yourself and thoroughly tested, for .edu and non-.edu customers alike.
http://www.esedirect.co.uk
--------------------------------------------------------------------------
Using MS 9.2.0.0 with the following customisations:
Lightbox/Fancybox enlarged images;
Auto-suggest searchbox;
Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
Failed transactions emailed via trigger;
Custom app to show basket contents when customer online;
Orders pushed through to accounting systems.
All the above without source!
Great! Thanks for all the help! I'll try it out.