ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

programming a calc subroutine, called from WordPress

(1/1)

Steven Avery:
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  :).

Steven Avery:
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.

Navigation

[0] Message Index

Go to full version