Print Page | Close Window

Affiliate from Form

Printed From: ProductCart E-Commerce Solutions
Category: ProductCart
Forum Name: Customizing ProductCart
Forum Description: Exchange messages with other users that are customizing ProductCart.
URL: https://forum.productcart.com/forum_posts.asp?TID=4108
Printed Date: 15-July-2025 at 5:43am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Affiliate from Form
Posted By: Joker
Subject: Affiliate from Form
Date Posted: 29-October-2010 at 8:03pm
I have a landing page for a specific product and affiliate that uses a different domain name. http://www.wisdomfilms.com/voiceforhope/ - http://www.wisdomfilms.com/voiceforhope/  I am using the form code as below to try and pass the order and affiliate id to the cart (login would be even better). I don't want them to go to the product page as the affiliate link normally works. The quantity and the product both work but it doesn't appear to be reading the affiliate ID. I looked at the code in http://www.wisdomoftheworld.com/store/pc/instPrd.asp - instPrd.asp  and it appears to check for an affiliateid through pcStartSession.asp  Is what I am doing possible? Should this be working? Should I pass the idaffiliate as pidaffiliate?  Is there another way to track these affiliate sales? Does anyone know? Thanks
 
<form method="post" action=" http://www.wisdomoftheworld.com/store/pc/instPrd.asp - instPrd.asp "  name="additem">
<input name="quantity" type="text" value="1" size="2" maxlength="2" />
<input name="idproduct" type="hidden" value="71" />
<input name="idAffiliate" type="hidden" id="idAffiliate" value="138" />
 



Replies:
Posted By: Greg Dinger
Date Posted: 29-October-2010 at 8:11pm
Have a look at pcStartSession.asp.  The part you are missing, I believe, is that affiliate needs to be established as a session variable.  pcStartSession.asp does just that, grabbing the querystring variable, and setting the session value.  To force your solution to work, you may need to carefully override that behavior.
 
Good luck.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |


Posted By: Joker
Date Posted: 29-October-2010 at 8:47pm
Thanks Greg,
 
I am a complete newbie to asp and product cart so I appreciate the help. It would be much easier for me in php or if I had built the store from scratch.
 
This is what I am thinking, on pcStartSession.asp after it checks for a querystring,  I add this?
If session("idAffiliate")=1 then
               pcInt_IdAffiliate = request.form("idAffiliate")
    if validNum(pcInt_IdAffiliate) then
     session("idAffiliate")=pcInt_IdAffiliate
    else
     session("idAffiliate")=1
    end if
   End if
 
 Hmmm will instPrd.asp hold/pass the form variable while it runs pcStartSession.asp or maybe I should add this to the top of instPrd.asp and just establish the session variable then. Any suggestions?
Thanks again


Posted By: Greg Dinger
Date Posted: 29-October-2010 at 11:22pm
No, that's not going to work if the affiliate ID was 138.  The session var needs to contain the actual affiliate id that you want to inherit the credit for the sale.  Beyond a gentle push in the right direction, I can't direct your precise coding effort here.  However, there are a number of developers here, our team included, that know the application well and can tackle this for you.
 
Just keep in mind that you need to get that session value to carry your affiliate id, then establish a suitable test environment and debugging points.


-------------
GreyBeard Design Group

Certified ProductCart Developer

Web Design/Development/Hosting

http://tinyurl.com/5c8t4t" rel="nofollow - Add-Ons & Custom Code |



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net