adding PHP code

General ShopSite user discussion

adding PHP code

Postby jill5111 » Tue Nov 30, 2010 2:01 pm

Is it possible to add PHP code to do some processing after an order has been completed? I found the spot to activate cgi code in Order API, however I would like to use PHP instead.
jill5111
 
Posts: 4
Joined: Tue Nov 30, 2010 1:58 pm

Re: adding PHP code

Postby loren_d_c » Tue Nov 30, 2010 2:30 pm

CGI is not limited to Perl scripts. As long as your ShopSite is not on a Windows server, and you have a CLI (command line interface) enabled version of PHP installed on the server, you can use PHP for any of the ShopSite APIs. See the following forum post for more info:

http://support.shopsite.com/forums/viewtopic.php?t=7033

-Loren
loren_d_c
 
Posts: 2572
Joined: Fri Aug 04, 2006 12:02 pm
Location: Anywhere

Re: adding PHP code

Postby jill5111 » Wed Dec 01, 2010 9:19 am

Thanks for the reply Loren!

I've looked at the links you provided. I am new to PHP programming and new to shopsite. I've been trying to test some of my work using a demo site, before making changes to my client's actual shopsite store. However it looks like I'll need FTP access to make the changes and upload the file to the correct folder. Is this correct?

To get the PHP code to run are you just modifying the Order API field (Custom CGI file name:) to show the PHP code you would like to execute?

Thanks again!
jill5111
 
Posts: 4
Joined: Tue Nov 30, 2010 1:58 pm

Re: adding PHP code

Postby Jim » Wed Dec 01, 2010 2:09 pm

you will need to ftp your script and put it in the /sc directory of your store and make sure it has the same ownership and permissions as the other cgis in that directory. You then put the name of your script in the Custom CGI Filename(s) field on the Merchandising > OrderAPI screen.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah


Return to User Forum

Who is online

Users browsing this forum: No registered users and 96 guests