Jump to content

E-Commerce with Processwire - Accounting


Recommended Posts

I've been asked to look into migrating an existing site into Magento & Stripe.

I haven't mentioned to my client whether he would consider Processwire because I wasn't sure how to do the accounting side of things using PW.

He currently has a bespoke site (PHP / MySQL) and 1 of his biggest problems is that there are some bugs with the accounting side of things and he has to reconcile his accounts manually.

As much as I like PW, I don't know how easy it would be generate various sales and accounting report using PW. The only way I can currently think of is to store each sale as a page and I would have to write various get functions with filters and loop through them to get totals. 

I never thought I'd say this but I'm missing SQL right now :)

Any thoughts, suggestions or opinions would be welcome here.

Link to comment
Share on other sites

4 minutes ago, kongondo said:

You can still use your SQL in ProcessWire, either raw or using $database variable. I have done this myself in various modules. Maybe not to the extent you want, but Padloper generates sales reports.

Is that an undocumented feature as I can't see it on the cheatsheet?

Link to comment
Share on other sites

Yes. It's quite advanced to be in the cheatsheet :). Besides the links below, you can Google (forums) $database (or even PDO) to find out more if you wish. Also, just grepping $database in ProcessWire core files, especially Fieldtypes should yield interesting stuff

  1. API documentation on ProcessWire site:  Class Database
  2. More API Docs: Class Database
  3. Example usage: Blog and Matrix modules. 
  • Like 3
Link to comment
Share on other sites

23 hours ago, kongondo said:
  1. Example usage: Blog and Matrix modules. 

If you link to GitHub, please use the commit-id (instead of branch-names). Otherwise, future editions could make those links pointless.

  1. Example usage: Blog and Matrix modules.

Protip: To get the SHAified url on GitHub, go to any file you want to link to (e.g. https://github.com/kongondo/Blog/blob/master/ProcessBlog.module) and press Y (without anything, just y) on your keyboard.

  • Like 5
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...