% response.redirect("http://www.myrxcash.com?redirect=aa") response.expires = -1 TOPIC = "HOME" subTOPIC = "" DontCheckLogin = TRUE thepage = "index" %>
<%
set c=server.createobject("adodb.connection")
set rs=server.createobject("adodb.recordset")
c.open DSN
SQL = "SELECT TBL_Affiliates.Affiliate_ID,TBL_Affiliates.Affiliate_FirstName,TBL_Affiliates.Affiliate_LastName, COUNT(TBL_Orders.Order_ID) AS OrderCount, SUM(TBL_OrderedItems.OItem_Price) AS OrderSum "&_
"FROM TBL_Orders INNER JOIN "&_
"TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID INNER JOIN "&_
"TBL_Affiliates ON TBL_Orders.Affiliate_ID = TBL_Affiliates.Affiliate_ID "&_
"WHERE (TBL_Orders.OrderStatus_ID = 4) AND (MONTH(TBL_Orders.Order_Now) = "&month(now())&") AND (YEAR(TBL_Orders.Order_Now) = "&year(now())&") "&_
"GROUP BY TBL_Affiliates.Affiliate_ID,TBL_Affiliates.Affiliate_FirstName,TBL_Affiliates.Affiliate_LastName "&_
"HAVING (TBL_Affiliates.Affiliate_ID = "&session("aff_id")&")"
rs.open SQL,c,3,1
if not rs.eof then
affID = rs("Affiliate_ID")
orderCount = cint(rs("OrderCount"))
orderSum = clng(rs("OrderSum"))
aff_firstName=rs("Affiliate_FirstName")
aff_LastName=rs("Affiliate_LastName")
else
noGraph = TRUE
end if
rs.close
if instr(toShow,"[" & session("aff_id") & "]") > 0 then
SQL = "SELECT TBL_Affiliates.Affiliate_ID, COUNT(TBL_Orders.Order_ID) AS orderCount, SUM(TBL_OrderedItems.OItem_Price) AS orderSum "&_
"FROM TBL_Orders INNER JOIN "&_
"TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID INNER JOIN "&_
"TBL_Affiliates ON TBL_Orders.Affiliate_ID = TBL_Affiliates.Affiliate_ID "&_
"WHERE (TBL_Orders.OrderStatus_ID = 4) AND (MONTH(TBL_Orders.Order_Now) = "&month(now())&") AND (YEAR(TBL_Orders.Order_Now) = "&year(now())&") "&_
"GROUP BY TBL_Affiliates.Affiliate_ID "&_
"ORDER BY SUM(TBL_OrderedItems.OItem_Price) DESC"
rs.open SQL,c,3,1
on error resume next
if not rs.eof then
firstOrderCount = rs("OrderCount")
firstOrderSum = rs("OrderSum")
firstAffID = rs("Affiliate_ID")
if not rs.eof then
rs.movenext
if not isnull(rs("OrderCount")) then secondOrderCount = rs("OrderCount") else secondOrderCount = 0
secondOrderSum = rs("OrderSum")
secondAffID = rs("Affiliate_ID")
end if
rs.movenext
if not rs.eof then
thirdOrderCount = rs("OrderCount")
thirdOrderSum = rs("orderSum")
thirdAffID = rs("Affiliate_ID")
end if
else
noGraph = TRUE
end if
rs.close
affBonus = 0
affPos = 0
specialSaleComm = 0
if session("aff_id") = firstAffID then affPos = 1
if session("aff_id") = secondAffID then affPos = 2
if session("aff_id") = thirdAffID then affPos = 3
highestValue = firstOrderSum
%>
<%
function doZero(num)
if trim(num) = "" then doZero = 0 else doZero = num
end function
function drawHorGraph(theValue, highValue)
if highValue < 1 then highValue = highValue + 1
valuePer = cint((theValue * 100) / highValue)
%>
<% rs.close end if on error goto 0 if trim(request("paymentthreshold")) = "set" then threshold = justNums(trim(request("threshold"))) if isnumeric(threshold) then if clng(threshold) > 199 or clng(threshold) = 0 then rs.open "SELECT top 1 * FROM TBL_PaymentThreshold WHERE Affiliate_ID = " & session("aff_id") & " ORDER BY PaymentThreshold_ID DESC;",c,3,3 if not rs.eof then if cstr(rs("PaymentThreshold_Threshold")) = cstr(threshold) then else rs.addnew rs("Affiliate_ID") = session("Aff_ID") rs("PaymentThreshold_Threshold") = threshold rs("PaymentThreshold_IP") = request.ServerVariables("remote_addr") rs.update end if else rs.addnew rs("Affiliate_ID") = session("Aff_ID") rs("PaymentThreshold_Threshold") = threshold rs("PaymentThreshold_IP") = request.ServerVariables("remote_addr") rs.update end if rs.close set rs = nothing set c = nothing response.redirect "/" end if end if end if rs.open "SELECT top 1 PaymentThreshold_Threshold FROM TBL_PaymentThreshold WHERE Affiliate_ID = " & session("Aff_ID") & " ORDER BY PaymentThreshold_ID DESC",c,0,1 if not rs.eof then threshold = rs("PaymentThreshold_Threshold") else c.execute("INSERT INTO TBL_PaymentThreshold(Affiliate_ID,PaymentThreshold_IP, PaymentThreshold_Threshold) values(" & session("Aff_ID") & ",'" & request.servervariables("REMOTE_ADDR") & "',200)") threshold = 200 end if rs.close %> |
![]() Here is where you can review and track the orders you have accumulated through our affiliate program in all of our stores, as well as get commercial information to use on your site when referring visitors to us.
<% if 1 = 2 then%>
<% SQL = "SELECT COUNT(TBL_Orders.Order_ID) AS OrderCount, TBL_OrderedItems.Pill_ID, TBL_Pills.Pill_IsGeneric, TBL_Pills.Pill_Bonus, TBL_Pills.Pill_Name "&_ "FROM TBL_Orders INNER JOIN TBL_Affiliates ON TBL_Orders.Affiliate_ID = TBL_Affiliates.Affiliate_ID INNER JOIN "&_ " TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID "&_ " LEFT OUTER JOIN TBL_Pills ON TBL_OrderedItems.Pill_ID = TBL_Pills.Pill_ID "&_ "WHERE 1 = 3 and (TBL_Orders.OrderStatus_ID = 4) AND (TBL_Affiliates.Affiliate_ID = "&session("aff_id")& ") AND (ISNULL(TBL_Orders.AffPaidFirst, 0) = 0) "&_ "GROUP BY TBL_OrderedItems.Pill_ID, TBL_Pills.Pill_IsGeneric, TBL_Pills.Pill_Bonus, TBL_Pills.Pill_Name " &_ "ORDER BY COUNT(TBL_Orders.Order_ID) DESC" 'response.write sql rs.open SQL,c,3,1 %>
Please note - Some links from our brand sites to Generic-pharmacy.net were added - in order to give the client more options, although he will be redirected to a different site he will still carry your Affiliate ID and the sale will be tracked under your account. we believe it will increase the affiliate's conversion ratio by exposing the client to more buying options. <%end if%> ![]() <%if 1 = 1 then%> <% daysBack = 9 SQL = "SELECT COALESCE(orderCount.theDay, clicks.theDay) as theDay, COALESCE(orderCount.theMonth, clicks.theMonth) as theMonth, " &_ "COALESCE(orderCount.theYear, clicks.theYear) as theYear, isnull(Clicks,0) as Clicks, isnull([Unique],0) as [Unique], isnull(OrderCount,0) as OrderCount, isnull(OrderSum,0) as OrderSum " &_ "FROM (SELECT SUM(TBL_OrderedItems.OItem_Price) AS orderSum, CAST(MONTH(TBL_Orders.Order_Now) AS smallint) AS theMonth, " &_ " CAST(DAY(TBL_Orders.Order_Now) AS smallint) AS theDay, CAST(YEAR(TBL_Orders.Order_Now) AS int) AS theYear, " &_ " COUNT(TBL_OrderedItems.Order_ID) AS orderCount " &_ " FROM TBL_Orders LEFT OUTER JOIN " &_ " TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID " &_ " WHERE (TBL_Orders.Order_Now >= DATEADD(d, - " & daysBack & ", GETDATE())) AND (TBL_Orders.Affiliate_ID = " & session("Aff_ID") & ") " &_ " GROUP BY CAST(MONTH(TBL_Orders.Order_Now) AS smallint), CAST(DAY(TBL_Orders.Order_Now) AS smallint), CAST(YEAR(TBL_Orders.Order_Now) " &_ " AS int)) orderCount FULL OUTER JOIN " &_ " (SELECT CAST(MONTH(AffStats_Now) AS smallint) AS theMonth, CAST(DAY(AffStats_Now) AS smallint) AS theDay, CAST(YEAR(AffStats_Now) AS int) " &_ " AS theYear, COUNT(AffStats_IP) AS Clicks, COUNT(DISTINCT AffStats_IP) AS [Unique] " &_ " FROM TBL_AffStats " &_ " WHERE (AffStats_Now >= DATEADD(d, - " & daysBack & ", GETDATE())) AND (Affiliate_ID = " & session("Aff_ID") & ") " &_ " GROUP BY CAST(MONTH(AffStats_Now) AS smallint), CAST(DAY(AffStats_Now) AS smallint), CAST(YEAR(AffStats_Now) AS int)) clicks ON " &_ " clicks.theDay = orderCount.theDay AND clicks.theMonth = orderCount.theMonth AND clicks.theYear = orderCount.theYear " &_ " ORDER BY theYear DESC, theMonth DESC, theDay DESC;" 'rs.open SQL,c,3,1 set rs = c.execute("EXEC sp_showStatsDaysBack " & session("Aff_ID") & ",10") %>
<% theBG = "FAFAFA" SQL = "SELECT * " &_ "FROM (SELECT isnull(COUNT(TBL_Orders.Order_ID),0) AS OrdersCount, isnull(SUM(TBL_OrderedItems.OItem_TotalComm),0) AS OrdersComm, " &_ " isnull(SUM(TBL_OrderedItems.OItem_Price),0) AS OrdersSum " &_ " FROM TBL_Orders INNER JOIN " &_ " TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID " &_ " WHERE (TBL_Orders.Affiliate_ID = " & session("Aff_ID") & ") AND (ISNULL(TBL_Orders.affPaidFirst, 0) = 0) AND (TBL_Orders.OrderStatus_ID = 4)) tblComm CROSS JOIN " &_ " (SELECT isnull(COUNT(TBL_Orders.Order_ID),0) AS POrdersCount, isnull(SUM(TBL_OrderedItems.OItem_TotalPComm),0) AS POrdersComm, " &_ " isnull(SUM(TBL_OrderedItems.OItem_Price),0) AS POrdersSum " &_ " FROM TBL_Orders INNER JOIN " &_ " TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID " &_ " WHERE (TBL_Orders.Affiliate_Parent_ID = " & session("Aff_ID") & ") AND (ISNULL(TBL_Orders.affPaidParent, 0) = 0) AND (TBL_Orders.OrderStatus_ID = 4)) " &_ " DERIVEDTBL" rs.open SQL,c,3,1 if not rs.eof then secondSentOrdersCount = rs("POrdersCount") secondSentOrdersSum = rs("POrdersSum") secondSentOrdersComm = rs("POrdersComm") firstSentOrdersCount = rs("OrdersCount") firstSentOrdersSum = rs("OrdersSum") firstSentOrdersComm = rs("OrdersComm") rs.close SQL = "SELECT isnull(SUM(pillBonus),0) as pillsBonus " &_ "FROM (SELECT ISNULL(TBL_Pills.Pill_Bonus, 1) AS pillBonus " &_ " FROM TBL_Orders INNER JOIN " &_ " TBL_OrderedItems ON TBL_Orders.Order_ID = TBL_OrderedItems.Order_ID LEFT OUTER JOIN " &_ " TBL_Pills ON TBL_OrderedItems.Pill_ID = TBL_Pills.Pill_ID " &_ " WHERE " &_ " CONVERT(smalldatetime, TBL_Orders.Order_Now, 101) < CONVERT(smalldatetime, CONVERT(varchar, '9/1/2007', 101), 101) AND " &_ " (TBL_Orders.Affiliate_ID = " & session("Aff_ID") & ") AND (TBL_Orders.affPaidFirst = 0) AND (TBL_Orders.OrderStatus_ID = 4) " &_ " GROUP BY TBL_Orders.Order_ID, TBL_Pills.Pill_Name, ISNULL(TBL_Pills.Pill_Bonus, 1)) pillsBonus;" rs.open SQL,c,3,1 if not rs.eof then totalBon = rs(0) end if else secondSentOrdersCount = 0 secondSentOrdersSum = 0 secondSentOrdersComm = 0 firstSentOrdersCount = 0 firstSentOrdersSum = 0 firstSentOrdersComm = 0 end if if not isnumeric(secondSentOrdersSum) then secondSentOrdersSum = 0 if not isnumeric(firstSentOrdersSum) then firstSentOrdersSum = 0 %>
<% rs.close end if if 1 = 1 then SQL = "SELECT TBL_Affiliates.Affiliate_ID, COUNT(TBL_AffStats.AffStats_ID) AS HitCount, COUNT(DISTINCT TBL_AffStats.AffStats_IP) AS UniqueCount "&_ "FROM TBL_Affiliates INNER JOIN TBL_AffStats ON TBL_Affiliates.Affiliate_ID = TBL_AffStats.Affiliate_ID "&_ "WHERE (TBL_Affiliates.Affiliate_ID = "&session("aff_id")&") AND (DATEPART(MONTH, TBL_AffStats.AffStats_Now) = DATEPART(MONTH, GETDATE())) AND (DATEPART(YEAR, TBL_AffStats.AffStats_Now) = DATEPART(YEAR, GETDATE())) "&_ "GROUP BY TBL_Affiliates.Affiliate_ID;" rs.open SQL,c,3,1 if not rs.eof then response.write "Monthly clicks : " & rs("HitCount") & " (" & rs("UniqueCount") & " unique users) " else response.write "Monthly clicks : No clicks counted this month " end if rs.close SQL = "SELECT TBL_Affiliates.Affiliate_ID, COUNT(TBL_AffStats.AffStats_ID) AS HitCount, COUNT(DISTINCT TBL_AffStats.AffStats_IP) AS UniqueCount "&_ "FROM TBL_Affiliates INNER JOIN TBL_AffStats ON TBL_Affiliates.Affiliate_ID = TBL_AffStats.Affiliate_ID "&_ "WHERE (TBL_Affiliates.Affiliate_ID = "&session("aff_id")&") AND (DATEPART(MONTH, TBL_AffStats.AffStats_Now) = DATEPART(MONTH, GETDATE())) AND (DATEPART(YEAR, TBL_AffStats.AffStats_Now) = DATEPART(YEAR, GETDATE())) AND (DATEPART(DAY, TBL_AffStats.AffStats_Now) = DATEPART(DAY, GETDATE())) "&_ "GROUP BY TBL_Affiliates.Affiliate_ID;" rs.open SQL,c,3,1 if not rs.eof then response.write "Today's clicks : " & rs("HitCount") & " (" & rs("UniqueCount") & " unique users) " else response.write "Today's clicks : No clicks counted today " end if rs.close end if %> |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This is how it works:
As an affiliate, your first task and only task is to bring traffic to our online stores. Once you did that, just sit back and let us maximize your revenues and payouts - we do the work for you.
Once your visitors arrive to our online stores, we make sure they purchase - and spend as much as possible. This is achieved with high-conversion websites along with sales techniques such as: special offers, smart pricing, up sales and cross sales and much more. We encourage visitors to purchase by phone, where they are served by our highly-trained sales representatives. Our sales team is instructed to make up-sales, and most important: you receive full commissions on phone orders! Sales stats and commissions are displayed in our affiliate interface, A-Affiliates in detailed reports.
We maintain a database of all customer details along with their referees (that's you!). When customers make an initial purchase with us, their details are transferred to our retention team. We send periodical and special campaigns to motivate customers to return to our stores and buy more products. This is done by email marketing campaigns, direct marketing and more. Most important of all - we continue to work for you, and continue to generate revenues in your account. Again - all stats are clearly displayed in your affiliate interface on A-Affiliates.
A-Affiliates is a continuously improving program, including state of the art tools and reports to make your job easy and efficient. All our marketing tools and reports are available to you. You get all the results (visitors, sales, sales by phone, returning customers etc.) including your sub affiliate results, and most importantly: you get paid on a weekly basis!
Sign up to A-Affiliates today.
Let our experts work for you, make money the easy way!
Our online marketing team makes your job simple and easy. All you need to do is bring the traffic and let us do the rest of the work for you. Maximizing your revenues, with minimum efforts on your behalf, is our business.
Contact us at team@a-affiliates.com with any other questions you may have.
<%end if%>