I like the Nop_Affiliate database table but I think that support for Affiliates can be enhanced in several ways.  As of right now, the AffiliateID from Nop_Affiliate is stored in 4 different database tables for referencing. Those 4 tables are Nop_Customer, Nop_Affiliate, Nop_Pricelist, and Nop_Order. First, throughout the course of a user coming to a store by clicking on an affiliate link, there is not any pro-active business logic that tracks the effectiveness of the Affiliate that successfully sent a potential buyer. If information was stored like the AffiliateID along with the IP Address of the incoming potential buyer and other information like the referring URL and record this in a table that can be scanned later important information that can assist in the process of decision making especially when it comes to making decisions about marketing or advertising.

An idea that I had was that if the incoming potential buyer was directed to the store by an affiliate URL and the potential buyer does not have a cookie already set on his computer or may not even be registered with the store, then nopCommerce could create another session specifically for the relationship to this new customer and the Affiliate who sent the new customer.  Something like:

CREATE TABLE [dbo].[Nop_Affiliate_Customer_Session] (
    [AffiliateCustomerSessionID] [int] IDENTITY(1,1) NOT NULL,
    [CustomerGUID] [uniqueidentifier] NOT NULL DEFAULT NEWID(),
    [AffiliateID] [int] NOT NULL,
    [CustomerID] [int] NOT NULL,
    [CreatedOn] [datetime] NOT NULL DEFAULT GETDATE(),
CONSTRAINT [PK_Nop_Affiliate_Customer_Session] PRIMARY KEY CLUSTERED
(
  [AffiliateCustomerSessionID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[Nop_Affiliate_Customer_Session]  WITH CHECK ADD  CONSTRAINT [FK_Nop_Affiliate_Customer_Session_Nop_Affiliate] FOREIGN KEY([AffiliateID])
REFERENCES [dbo].[Nop_Affiliate] ([AffiliateID])

ALTER TABLE [dbo].[Nop_Affiliate_Customer_Session]  WITH CHECK ADD  CONSTRAINT [FK_Nop_Affiliate_Customer_Session_Nop_Customer] FOREIGN KEY([CustomerID])
REFERENCES [dbo].[Nop_Customer] ([CustomerID])

******************

Ok, now that we have a system in place to track the customer's actions and record them along with the AffiliateID, we can build charts and graphs from the data collected that will help when making important marketing or advertising decisions.  Here is a database table that I started designing and I am going to implement it in a system I am developing. Let me know if any of these ideas could benefit nopCommerce because I am interested to see what kind of new dashboard features you could make from some more affiliate support.

Here is the database table I started designing:

CREATE TABLE Nop_Affiliate_Traffic (
   [AffiliateTrafficID] [int] IDENTITY(1,1) NOT NULL,
   [AffiliateID] [int] NOT NULL,
   [IPAddress] [nvarchar](100) NOT NULL DEFAULT '',
   [PageURL] [nvarchar](200) NOT NULL DEFAULT '',
   [ReferralURL] [nvarchar](200) NOT NULL DEFAULT '',
CONSTRAINT [PK_Nop_Affiliate_Traffic] PRIMARY KEY CLUSTERED
(
  [AffiliateTrafficID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY]

ALTER TABLE [dbo].[Nop_Affiliate_Traffic]  WITH CHECK ADD  CONSTRAINT [FK_Nop_Affiliate_Traffic_Session_Nop_Affiliate] FOREIGN KEY([AffiliateID])
REFERENCES [dbo].[Nop_Affiliate] ([AffiliateID])

*****************

One thing that I was also thinking of is that when a customer begins to check out their items and they have come from an affiliate URL, you can scan that Nop_Affiliate_Customer_Session table to find out if the current customer session has an affiliate id.