Zen Cart Logo
Forums / General Questions / Product Purchase, Run CGI

Product Purchase, Run CGI

Locked

Views: 1,403

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
28 Dec 2006, 11:52 PM
#1
stevai avatar

stevai

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Product Purchase, Run CGI

Hello all,
I'm new to Zen Cart. I've got it setup look and feel wise pretty much how I'd like it.
Now, I'm selling software that I write. The customers will use my main site to download 30-day trial versions, and then need to purchase a key through the Zen Cart store to activate it for further usage.
How would I go about, after the checkout is complete (I use PayPal only) to provide them with a key. To generate the key, I must run a CGI (C++) program which can return the result in any way necessary. Do I need to modify the checkout PHP to look for specific product names hardcoded and then execute the command or can it be an option name/value.

29 Dec 2006, 4:01 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Product Purchase, Run CGI

I would hook into the order class in the loop that works its way through all the attributes and add the additional text with the generated key directly to one of the attribute descriptions.

  • check to see if matches hard-coded product ID number, and hard-coded option name/value pair, call external program to generate key, save the generated key as part of the attribute option-value text in the order.

Likely somewhere between:
//------ bof: insert customer-chosen options to order--------
and
//------eof: insert customer-chosen options ----

29 Dec 2006, 1:14 PM
#3
stevai avatar

stevai

New Zenner

Join Date:
Dec 2006
Posts:
2
Plugin Contributions:
0

Re: Product Purchase, Run CGI

Sounds good. I was just wondering if it was able to be done via some options, or been done already.

Thanks.