topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 3:40 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: programming a calc subroutine, called from WordPress  (Read 4090 times)

Steven Avery

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,038
    • View Profile
    • Donate to Member
programming a calc subroutine, called from WordPress
« on: November 18, 2019, 09:54 AM »
From WordPress / Woo Commerce I would like to shell out (call a subroutine) and do some comparison-calc logic.  This is to determine if an item is subject to sales tax. The product (item) will have some Y/N flag fields, and these will be compared to the 50 states, (+DC, maybe PR) to see if that item is sales tax liable in that state.   There will not be 50 sections, since some states are identical (e.g. about 10 have no sales tax for these products), maybe there will be 25 separate logic sections. Each section will have maybe 5-10 lines of code. I can supply the logic, and maybe do the code.

For speed, and confidentiality, it would be nice to be compiled. 

What tool should be used? 

Presumably reasonably English simple-style, for long-term maintenance:
(If State=FL and Field-Kruggerand=Y evaluate SST=Y and Goto End)

Your thoughts? 
This might also be a gig :).

SST=StateSalesTax - a plug-in from a 3rd party knows the current rate from the address, which can include local city/town add-ons.

There are other complexities, especially with threshold levels, at the moment that is another story.

We also have wonderful complexities in pricing  :).
« Last Edit: November 18, 2019, 10:08 AM by Steven Avery »

Steven Avery

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 1,038
    • View Profile
    • Donate to Member
Re: programming a calc subroutine, called from WordPress
« Reply #1 on: November 25, 2019, 10:21 PM »
It is possible that this should simply be a Plug-in in WooCommerce, written in PhP.  Their plug-ins have their own formal structure, which is explained on the Net.  Maybe I should see the PhP syntax.  I would have to either write it myself, or give the logic to somebody to write.  So far I have not gotten feedback on using a compiled language, but I am checking a bit more.