Register    Login    Forum    Search    FAQ

Board index » General Usage » Other




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Adding an order via a script or other non-interactive means
 Post Posted: Mon Jul 30, 2012 3:27 pm 
Offline

Joined: Mon Jan 05, 2009 9:58 am
Posts: 30
Does Phreebooks contain any API or similar facility to add orders without using the web interface?

I'm looking to write a bash script to pull customer and purchase info from an order email (generated by my shopping cart) and use said info to automatically create an invoice under a pre-existing customer account in Phreebooks.

Is this possible? I know I could probably use MySQL to add the order info to the database manually, but if there is a simpler way I'd perfer that...

Can you point me in the right direction?

_________________
Tony Lovasco
Twisted Lincoln, Inc.
http://www.twistedlincoln.com


Top 
 Profile  
 
 Post subject: Re: Adding an order via a script or other non-interactive me
 Post Posted: Tue Aug 07, 2012 5:18 pm 
Offline

Joined: Fri Oct 26, 2007 3:55 pm
Posts: 3498
Location: Colorado, US
You should NEVER enter data directly into the db. There are too many dependencies between tables and the chance of messing things up is very high. The concept behind Phreedom is a loosely coupled interaction between the code and external interfaces. The API is the XML transactions handled in Phreedom and other applications. I don't have a lot of experience with bash scripting but if you can post a xml transaction through this method and process a response, you should bed able to enter an order this way.

Dave


Top 
 Profile  
 
 Post subject: Re: Adding an order via a script or other non-interactive me
 Post Posted: Tue Aug 07, 2012 9:10 pm 
Offline

Joined: Mon Jan 05, 2009 9:58 am
Posts: 30
I laugh. That's kinda what I was thinking... :)

I think I can handle the bash script part, it's the actual XML transaction process that I'm not familiar with in the context of Phreebooks.

Is the Phreebooks API documented anywhere? Or, in the alternative, could you point me in the right direction within the PHP code? It might be easier for me to write a PHP script that enters the invoice info, and just call that script from bash when needed.

_________________
Tony Lovasco
Twisted Lincoln, Inc.
http://www.twistedlincoln.com


Top 
 Profile  
 
 Post subject: Re: Adding an order via a script or other non-interactive me
 Post Posted: Wed Aug 08, 2012 5:23 pm 
Offline

Joined: Fri Oct 26, 2007 3:55 pm
Posts: 3498
Location: Colorado, US
In the ZenCart interface, Zencart files folder, look at the file /admin/includes/classes/phreedom.php. This assembles the string to submit. the code includes the soap cURL file to performt he xml transaction.

Dave


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 4 posts ] 

Board index » General Usage » Other


Who is online

Users browsing this forum: No registered users and 2 guests

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron