Topic: osc_orders - which osCommerce?

When designing any extension and keeping it uptodate, let us use the Git Master version of FA when not changed too often as sometimes the released versions have fixes applied thereafter.

The osc_orders extension to FA 2.4.x repo is here. Those of you who have tested it it, please state FA version and osCommerce versions used.

There are several versions of osCommere and most are listed here:

osCommerce v3.0.2 was released on 2011-08-06
https://github.com/osCommerce/oscommerce/releases
It's last real commit was on 2012-03-14 and the readme was updated on
2012-10-30
https://github.com/osCommerce/oscommerce/commits/master

The officially supported online merchant version is 2.3.4.1
https://www.oscommerce.com/Products
The beta version there is 2.4.0
There is also a v2.2RC2a version listed at:
https://www.oscommerce.com/Us&News=130

https://forums.oscommerce.com/topic/412630-github-tls12-sourcetree-broken/
For a new install or if your store isn't mobile-friendly, get the
community-supported responsive osCommerce (2.3.4.1 CE) here:
https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip
With Bootstrap 3:
https://forums.oscommerce.com/topic/396152-bootstrap-3-in-234-responsive-from-the-get-go/
Last release of https://github.com/gburton/Responsive-osCommerce with
Bootstrap 4 is on 2018-05-18:
https://github.com/gburton/Responsive-osCommerce/releases
And the last commit there is at 2019-04-10
Discussions at:
https://forums.oscommerce.com/forum/107-oscommerce-online-merchant-community-bootstrap-edition/

The Sourceforge version is stuck at v2.2ms2-060817 dated 2006-08-17
https://sourceforge.net/projects/tep/files/osCommerce/2.2%20Milestone%202%20060817/

oscMax2 is at v2.5.4 released on 2014-07-03 - https://github.com/osCmax/oscmax2/releases
osCmax is based on osCommerce 2.2RC2a and is an
extension of that application.
Last commit on 2016-04-10 - https://github.com/osCmax/oscmax2/commits/2.5.5
Showcased at: https://www.oscmax.com/

osCommerce v2.4.x is on GitHub at https://github.com/osCommerce/oscommerce2
The latest version 2.4.2 was released on 2016-11-21
https://github.com/osCommerce/oscommerce2/releases
The last commit in that branch was on 2016-11-24

Re: osc_orders - which osCommerce?

@apmuthu:

I would be surprised if anyone was using FA 2.4.x osc_orders except me, but even then I use a customized version.   I still use osCommerce v2.2RC2a but will be discontinuing it in the near future.

The roll-your-own web store has been waning in popularity and I doubt that almost anyone would use osCommerce  for new installations.  Rather, webbuilders and canned web sites along with commercial integrated accounting seem to be the popular choice at the moment.

Re: osc_orders - which osCommerce?

I am using it and will likely keep using it on my own site mostly because I don't want to deal with porting everything into a new program/db

I have been updating the osc_orders module to better map osc customers to FA debtor_masters

Is there a way an addon can get notified of db transactions?

delete debtor_master record (to delete mapping to osc cID)
maybe order dispatch to enter comments in osc orders history and maybe email customer.

Tom

Re: osc_orders - which osCommerce?

The db_prewrite/db_postwrite hooks in hooks.inc may be what you are looking for.

Note that the FA2.4 osc_orders now supports two methods of order processing.  The first is the method that you are using when you wrote the original module: import OSC sales orders and process them in FA.   The second is the method that I wrote that imports completed orders as paid direct invoices.   In this method, all handling of the customer (shipping/payment/customer email/etc) is done in OSC.    The first method is useful when FA is used to handle A/R, statements, aging, invoicing.   The second method is useful when the orders are prepaid, which is the usual mode of online stores.

5 (edited by tom 05/11/2019 12:27:27 pm)

Re: osc_orders - which osCommerce?

In the second method is that where you use a specified debtor_no and create branches for these transactions?
I also saw the direct invoice option, which I did not touch.

In my original module I looked up osc customer in FA simply by their name, so duplicate names was a problem,
a second customer by the same name just looked like the one guy moved...

Now it maps between the DBs using the table index for the tables.

I just need to add a db_postwrite hook to update the table if a debtor master record is deleted.

Tom

UPDATE: I see that there are no db hooks for debtor_master transactions, so I think we can live with extra osc_customer records.
I will check the code to make sure if the osc cID is re-imported that it will behave well and maybe clean up

Re: osc_orders - which osCommerce?

Yes, unfortunately the db hooks for debtor_master transactions are missing.

FA doesn't support two customers with the same customer short name so it is unclear to me how you were able to handle duplicate OSC names unless you put some unique identifier in the customer short name.

The second method can work just like the first method in using the OSC name for the customer.    The separate feature of mapping all the OSC names into a single customer name is useful if one does not care about the names in FA.   Originally, because each customer could have a separate tax rate, customer branches had to be defined for each tax rate.  That scheme breaks down if there are a zillion different tax rates which is really a problem with FA.  Thus, in my FA core, I no longer use pre-assigned tax rates but instead grab them from an off-site provider, just like the way currency rates work.     I modified OSC for the same reason, and the tax algorithm and rates have to match in order for the order to successfully imported into FA.

Re: osc_orders - which osCommerce?

Good point, I will have append a unique id to the short name (maybe osc customers_id)

I have the tax rates just fine, the tax rate is based upon the delivery address, which is what the Branches identify.

In osc I have about 22 tax rates for Florida, one for each county - which is the way osc was designed.

I get a notice from the state of Florida (along with my filing forms) with the tax rate changes... change in osc and change in FA poof all done

Tom

Re: osc_orders - which osCommerce?

Be prepared for change from the South Dakota v. Wayfair decision.  States want to collect sales tax from out-of-state retailers based on the tax jurisdiction of the customer, including municipal and overlay tax districts.   Because of South Dakota v. Wayfair, In-state retailers will be required to follow the same rules.   In Colorado we have 733 possible tax rate outcomes based on the customer address, and the city or zip code in the address is insufficient to make that determination.

Re: osc_orders - which osCommerce?

Update 6th May, 2019 (same link as above): SB 1112 died in Appropriations. It appears that Florida won't be taxing remote sales any time soon.

Re: osc_orders - which osCommerce?

It take a pretty large company to hit these targets:

Conducts 200 or more separate retail sales of tangible personal property or taxable services for delivery in Florida; or
Conducts any number of retail sales of tangible personal property or taxable services for delivery in Florida in an amount exceeding $100,000

200 sales in a specific state or $100k per year

All these sales tax reforms have exclusions for smaller businesses

Anyone bigger won't be using osCommerce for sure

tom

Re: osc_orders - which osCommerce?

Yes, SB1112 died in Appropriations.

But examine the states that have implemented the change.   In many states (e.g. Utah, South Dakota), simply operating a business within the state with sales over $100k or 200 separate transactions is sufficient to create the nexus.     For example, if you have a taco stand and if you make any deliveries, you are subject to the new tax scheme.

In Colorado, this could be 10 different districts within 10 miles.  Prior to 2019, this was a uniform 2.9%.   Instate retailers paid sales tax and out-of-state purchases were subject to use tax, which almost no one ever paid.   This was unfair to the brick-and-mortar businesses that paid much more.   So now Colorado wants all deliveries (in-state and out-of-state) to pay the same as brick-and-mortar, which means there are 733 tax districts to worry about when making any delivery.

Some other states just upped the uniform tax rate instead of imposing the same brick and mortar tax requirements.  Florida wanted to just define the nexus as deliveries only.     I am no legal expert, but brick-and-mortar business will still be unhappy if they have to pay sales tax of 9% on any sale regardless of volume and everyone else who delivers into their tax zone pays a lower rate.

Re: osc_orders - which osCommerce?

Yeah, ok.

COnsider these facts:

1 - It does not appear that very many people would are using the osc_orders addon
2 - osCommerce is pretty old, so anyone having $100k in sales would likely not be using it

A taco stand is not likely to use osC, osC is a web store, having 200 transactions within a 10 mile radius of a given *remote* location is a long shot

I pay all the sales tax I am bound to pay in Florida, as a PERSON I can not be required to follow all the tax laws of all 50 states, it is an unnecessary burden upon me.

There is a huge difference between me and Wayfair and most people using osCommerce (or any Free e-commerce solution) are likely not big enough to be included.

I wonder what they are smoking on Colorado to think they can enforce sales tax laws like that on individuals. (you said all Deliveries)

Tom

Re: osc_orders - which osCommerce?

If you only have 22 tax rates for Florida, you might not be collecting all the sales tax that is required.   Florida, like Colorado, is a destination-based state.  I am not certain what the Florida requirements are,  but this usually means that, for orders placed via the internet/mail by a customer within Florida from a Florida vendor, the vendor must collect a sales tax rate applicable at the buyer's address (including any applicable local sales taxes).

Before 2019, Colorado vendors selling within Colorado usually needed to charge 2.9% for any sale outside the physical location.   This was very easy.   After 2019, there are now 733 local tax districts to deal with.   FA and OSC do not natively support tax by destination address and county/city/zip code are insufficient to determine the applicable tax rate.

You are right that the small business is usually exempt from these new out-of-state rules.  Thus you can sell into Colorado without having to follow its in-state rules.

Re: osc_orders - which osCommerce?

Isn't it time govts stopped interfering with businesses?
Americans should not vote for such reps who try to bully businesses.
Any place is just as rich as the number of goods and services available to it and such laws are not making it conducive for it either.
Why should brick-and-mortar shops complain - they too can go the internet way even if delivering to their neighborhood!

The following make for good reading:

https://www.cpapracticeadvisor.com/sales-tax-compliance/article/12402391/the-future-of-the-online-sales-tax-part-1
https://www.cpapracticeadvisor.com/sales-tax-compliance/article/12402389/the-future-of-the-online-sales-tax-part-2
https://www.avalara.com/taxrates/en/blog/2014/07/future-internet-sales-tax-internet-tax-freedom.html
https://www.brookings.edu/blog/up-front/2018/07/16/the-history-and-future-of-the-retail-sales-tax/
Sales Tax base has been shrinking and the ST Rate has been increasing!

Re: osc_orders - which osCommerce?

@tom: Updated osc_orders extension in GitHub FA24extensions repo.

Post's attachments

osc_orders_v2.4.0-4.zip 17.1 kb, 2 downloads since 2019-05-13 

You don't have the permssions to download the attachments of this post.

Re: osc_orders - which osCommerce?

Braath Waate wrote:

If you only have 22 tax rates for Florida, you might not be collecting all the sales tax that is required.   Florida, like Colorado, is a destination-based state.  I am not certain what the Florida requirements are,  but this usually means that, for orders placed via the internet/mail by a customer within Florida from a Florida vendor, the vendor must collect a sales tax rate applicable at the buyer's address (including any applicable local sales taxes).

Before 2019, Colorado vendors selling within Colorado usually needed to charge 2.9% for any sale outside the physical location.   This was very easy.   After 2019, there are now 733 local tax districts to deal with.   FA and OSC do not natively support tax by destination address and county/city/zip code are insufficient to determine the applicable tax rate.

You are right that the small business is usually exempt from these new out-of-state rules.  Thus you can sell into Colorado without having to follow its in-state rules.

If I have 22 tax rates in osc and FA and like I said above I update them every year as I get noticed from DOR, why would you think I am doing it wrong?

I collect and pay at the tax rate of the delivery location of each Florida order, I have done so for almost 20 years.

Tom

Re: osc_orders - which osCommerce?

apmuthu wrote:

@tom: Updated osc_orders extension in GitHub FA24extensions repo.

I will be coming out with a new version that makes sure the Short Name of a debtor_master record is unique and the Branch Name of a custome_branch is also unique for osC imports

Tom

Re: osc_orders - which osCommerce?

apmuthu wrote:

Isn't it time govts stopped interfering with businesses?
Americans should not vote for such reps who try to bully businesses.

I think that the Sales Tax should be collected at the point of SALE (Not Delivery)

So if my state encourages business then IT should reap the benefits.

It also makes it much simpler for the businesses to collect and pay.

Ya know Florida expects it's citizens to report and pay sales tax on any untaxed mail orders.

Tom

Re: osc_orders - which osCommerce?

If I have 22 tax rates in osc and FA and like I said above I update them every year as I get noticed from DOR, why would you think I am doing it wrong?

Because there are a lot more Florida tax jurisdictions than 22.   If you have less than 100 customers or so around the state, then 22 could be the right number.    Florida DOR has a tool that you could plug in some customer addresses and see if you get the same rate as FA/OSC.

Re: osc_orders - which osCommerce?

from http://floridarevenue.com/taxes/taxesfees/Pages/sales_tax.aspx

Sales tax and discretionary sales surtax are calculated on each taxable transaction. Florida uses a bracket system for calculating sales tax when the transactions fall below or in between whole dollar amounts. Multiply the whole dollar amount by the tax rate (6% plus the county discretionary sales surtax rate)

There are 22 counties in Florida, so I only have 22 different sales tax zones that I need to worry about.

Sales tax is ONLY calculated on a COUNTY basis.

I think you like to make things overly complex.

Tom

Re: osc_orders - which osCommerce?

Aha, I see that now.  There isn't any city tax in Florida, just county and state, as you have said.  Sorry for the confusion.

Re: osc_orders - which osCommerce?

Braath Waate wrote:

Aha, I see that now.  There isn't any city tax in Florida, just county and state, as you have said.  Sorry for the confusion.

No problem.

That shows the simplicity of the osCommerce Tax groups.

When a customer enters their state as Florida, they are then presented with a State Pulldown list that includes ALL the tax groups within Florida and the descriptive name helps THEM pick the right one, after all they know where they live and what tax rates the are subject to.

It was a perfect solution for eCommerce 10 years ago.

Tom