I think what happened was that I was going to add more return data so that both the price with and price without tax could be returned as separate values and got sidetracked... Even trying to look at it now, it seems I would have to do a "reverse" calculation for cases where the store is set to display the price with tax and the without tax price was desired, because the function to "add" tax does not accept a negative number and at the point of return of data to the class, the shopping cart has already done all its math with the tax included in the final price and no "intermediate" or untaxed value is returned. I.e. other method is to do like what is done in the sidebox of running all of the numbers in the code. Prefer re-usability over maintaining additional/duplicate code, but... Alternatively the incl VAT/Excl VAT code includes some features for this, so could detect and reuse that code as necessary adding a potential dependency.
*shaking head* okay enough about that, thank you for noting the issue and providing the explanation(s). Once I had a "final" price, original price and an idea of what the VAT percentage was and looking at the code, it became quite obvious what was going on.
Bookmarks