| Author | 
	Message | 
	
		sunnysb 
		Newbie - Two Blades 
		
		
		
			Joined: 19 Jan 2005 
			Posts: 24 
			
		  
		 
	 | 
	
		
		  capture hidden value on add to cart, then carry through...   
		
			I'm not sure if I chose the correct forum to post this...
 
 
I know I can use hidden x_comments on the checkout form, and they then carry through and are emailed to me.
 
 
However, how do I capture a hidden value on the product page, and then carry it through the checkout process?
 
 
i.e.  in the product page form, I would like to add
 
<input type="hidden" name="secret" value="varies">
 
which is then recorded when someone clicks on "add to cart"
 
 
I then want the value of "secret" emailed to me with the order...
 
 
Again, I know this is a no-brainer from the checkout form, but how about from the product page add to cart form?
 
 
What do I do???
  
			
			
		 
	 | 
	| Tue Feb 08, 05 3:07 pm | 
	          | 
	  | 
	
		scottcrew 
		Moderator 
		
		 
		
			Joined: 13 Feb 2004 
			Posts: 7516 
			Location: The West Side of MI USA
		  
		 
	 | 
	
		
		
		
			You would probably need to set it up as an option.
 
IE:
 Code:<input type="hidden" name="option|002|%%PRODUCT_ID%%" value="varies">
HTH!~
			 
			_________________ God Bless!
 
Bonnie - AgoraCart Moderator
 Get a Gold Membership
		 
	 | 
	| Tue Feb 08, 05 3:22 pm | 
	               | 
	  | 
	
		sunnysb 
		Newbie - Two Blades 
		
		
		
			Joined: 19 Jan 2005 
			Posts: 24 
			
		  
		 
	 | 
	
		
		
		 
			thanks for the quick suggestion.
 
 
I just added the code and it works...
 
<input type="hidden" name="option|099|%%PRODUCT_ID%%" value="varies">
 
 
except the option shows up on the cart display under the other options, and I want it to be hidden!
 
 
can I keep it from showing up?
  
			
			
		 
	 | 
	| Tue Feb 08, 05 3:38 pm | 
	          | 
	  | 
	
		scottcrew 
		Moderator 
		
		 
		
			Joined: 13 Feb 2004 
			Posts: 7516 
			Location: The West Side of MI USA
		  
		 
	 | 
	
		
		
		
			What information, exactly, are you wanting to pass? 
 
Does it affect the price? 
 
Does it vary product to product?
 
There is a possibility that you could use a user field for the info. 
 
I'm not sure that there is any way to keep it completely secret from the customer but not to you. Even using a user field and not having it defined in the cart display, it would still need to be defined in the email and it would still show up in the customer's email.
 
HTH!~
			 
			_________________ God Bless!
 
Bonnie - AgoraCart Moderator
 Get a Gold Membership
		 
	 | 
	| Tue Feb 08, 05 3:45 pm | 
	               | 
	  | 
	
		sunnysb 
		Newbie - Two Blades 
		
		
		
			Joined: 19 Jan 2005 
			Posts: 24 
			
		  
		 
	 | 
	
		
		
		 
			When a customer first comes to my site, I capture some info about them in a cookie.  When they place an order, I read that cookie and save the info in a hidden form field.
 
 
So, each customer has a unique value.
 
 
whats the best way to record this on the product page and then pass it along...
  
			
			
		 
	 | 
	| Tue Feb 08, 05 4:36 pm | 
	          | 
	  | 
	
		Mister Ed 
		E-commerce Engineer 
		
		 
		
			Joined: 05 Nov 2003 
			Posts: 311 
			Location: If I told you, I'd have to kick yer cat!  If I must: Out standing in my field of course!
		  
		 
	 | 
	
		
		
		
			howdy,
 
I don't have time to cover this, but here's the pointer that will narrow your search fer a solution:
 
use serverside cookies.  These are latched on in the second freeform logic box.  This is an advanced subject that requires you to understand some Perl or C++ (as they are similar in a few ways). There are basically two sub routines you call to add and retrieve teh serverside cookie info.  We use this for affiliate modules, ad tracking and other things as needed. The abilities are endless when you use them in conjuctions with codehooks.
 
Okay I might have confuzzeled ya a bit, but that is the solution if you have an idear of what I just said.
 
ME
			 
			_________________ Vote Mister Ed for Prez 2012, for a REAL change.
 
Need Low Cost Startup Option? Try NiftyPay's Pay to Play
 http://www.NiftyPay.com
		 
	 | 
	| Fri Feb 11, 05 7:43 pm | 
	           | 
	  | 
	
		sunnysb 
		Newbie - Two Blades 
		
		
		
			Joined: 19 Jan 2005 
			Posts: 24 
			
		  
		 
	 | 
	
		
		
		 
			Thanks ME.  Can you give a link to more detailed info?
 
 
I was thinking that the problem had already been solved for affiliate tracking, but couldn't find a step-by-step explanation of how to implement it.
  
			
			
		 
	 | 
	| Fri Feb 11, 05 9:03 pm | 
	          | 
	  | 
	
		Mister Ed 
		E-commerce Engineer 
		
		 
		
			Joined: 05 Nov 2003 
			Posts: 311 
			Location: If I told you, I'd have to kick yer cat!  If I must: Out standing in my field of course!
		  
		 
	 | 
	
		
		
		
			Sorry, don't have such a beast.
 
It's an undocumented feature that only a developer or coder would find.  There has been mention of it in the members only areas and I tend to help more with it there.  I just thought I'd give ya the clues at this point since it can be fairly complex if you don't know Perl or atleast how to use and find the subroutines.  Step by step would be impossible too, as it is totally flexible according to your Perl knowledge (like the codehook features). it will do almost anything between these two features.
 
sorry,
 
ME
			 
			_________________ Vote Mister Ed for Prez 2012, for a REAL change.
 
Need Low Cost Startup Option? Try NiftyPay's Pay to Play
 http://www.NiftyPay.com
		 
	 | 
	| Sat Feb 12, 05 12:31 pm | 
	           | 
	  | 
	
		sunnysb 
		Newbie - Two Blades 
		
		
		
			Joined: 19 Jan 2005 
			Posts: 24 
			
		  
		 
	 | 
	
		
		
		 
			thanks...
 
 
actually, I already have a program that sets a cookie, and then reads the value when I need it.  The problem I have is that it is domain-dependent, and my checkout page where I want to read the program is ssl / https which is seen as a different domain, so the cookie from my regular http domain is not read...   problem make sense?
 
 
I guess I'll do some searching and see what I can find.  I've seen other posts that mention the problem with cookies and "change of state" which I THINK means my problem, the secure part of my website is seen as a different domain...
  
			
			
		 
	 | 
	| Sat Feb 12, 05 1:26 pm | 
	          | 
	  | 
	| 
		
	 |