1.0.8.3 Questions / Comments / Concerns
VAT/tax not being added since update to 1.0.8.3
I installed 1.0.8.2 as an evaluation as I need to do update an old OSCommerce site. I imported my old SQL data (categories/products/zones) and managed to get it working ok. Set prices to show with VAT inc. Showed as expected.
I then updated to 1.0.8.3 earlier this week. I've done a fair bit of tweaking but none that edited the base code. I noticed earlier today that the prices weren't showing as VAT included. I can't see anything wrong though.
So I then did a separate fresh install of 1.0.8.3 and done another import of the data (i.e. no code changes or additions). The correct VAT is showing in admin (in admin, the products gross price definitely has the VAT added). In admin, I've definitely set the store country and zone correctly. However, all front end prices are VAT less. I'm not logged into the front end (logging in has no effect either).
Anyone seen this?
I then updated to 1.0.8.3 earlier this week. I've done a fair bit of tweaking but none that edited the base code. I noticed earlier today that the prices weren't showing as VAT included. I can't see anything wrong though.
So I then did a separate fresh install of 1.0.8.3 and done another import of the data (i.e. no code changes or additions). The correct VAT is showing in admin (in admin, the products gross price definitely has the VAT added). In admin, I've definitely set the store country and zone correctly. However, all front end prices are VAT less. I'm not logged into the front end (logging in has no effect either).
Anyone seen this?
Tags:
Re: VAT/tax not being added since update to 1.0.8.3
Just did a fresh install of 1.0.8.2 - repeated the above steps (i.e. just SQL import) - VAT is correctly being added on this install.
Then I did a fresh install of 1.0.8.3 - but imported sample data (and none of my own). I set the lemon to $10 and set the tax class to taxable goods. Gross price is $10.7 in admin (7% Florida tax as expected). Set 'display prices with tax' to true - front end is showing $10 though.
So - definitely a bug somewhere
Then I did a fresh install of 1.0.8.3 - but imported sample data (and none of my own). I set the lemon to $10 and set the tax class to taxable goods. Gross price is $10.7 in admin (7% Florida tax as expected). Set 'display prices with tax' to true - front end is showing $10 though.
So - definitely a bug somewhere
-
- VIP Member
- Posts: 119
- Joined: Thu Oct 29, 2020 12:34 pm
- Has thanked: 11 times
- Been thanked: 4 times
Re: 1.0.8.3 Questions / Comments / Concerns
Hello,
Since updating I have the following in my logs AND it shows up in the order email confirmation! Do not know what to fix ...
PHP Notice: A non well formed numeric value encountered in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php on line 52
Since updating I have the following in my logs AND it shows up in the order email confirmation! Do not know what to fix ...
PHP Notice: A non well formed numeric value encountered in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php on line 52
-
- Lead Developer
- Posts: 2656
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: 1.0.8.3 Questions / Comments / Concerns
Before line 52, addartfulweb wrote: ↑Fri May 14, 2021 8:14 pm Hello,
Since updating I have the following in my logs AND it shows up in the order email confirmation! Do not know what to fix ...
PHP Notice: A non well formed numeric value encountered in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php on line 52
Code: Select all
error_log(new Exception("$products_price"));
-
- VIP Member
- Posts: 119
- Joined: Thu Oct 29, 2020 12:34 pm
- Has thanked: 11 times
- Been thanked: 4 times
Re: 1.0.8.3 Questions / Comments / Concerns
Hello Matt,ecartz wrote: ↑Sat May 15, 2021 2:52 amBefore line 52, addartfulweb wrote: ↑Fri May 14, 2021 8:14 pm Hello,
Since updating I have the following in my logs AND it shows up in the order email confirmation! Do not know what to fix ...
PHP Notice: A non well formed numeric value encountered in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php on line 52That should add the stack trace to the error log so that you know what called it. Note that it will print more log entries. You'll have to look for the ones just before the notice that you are getting now.Code: Select all
error_log(new Exception("$products_price"));
Thanks for answering. Here is the log file:
Exception: 4.8333 in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php:52
Stack trace:
#0 /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php(85): currencies->calculate_price('4.8333', 20, 1)
#1 /xx/xx/xx/xx/includes/modules/header_tags/ht_product_schema.php(60): currencies->display_raw('4.8333', 20)
#2 /xx/xx/xx/xx/includes/system/versioned/1.0.7.9/osc_template.php(79): ht_product_schema->execute()
#3 /xx/xx/xx/xx/templates/override/includes/components/template_top.php(13): oscTemplate->buildBlocks()
#4 /xx/xx/xx/xx/templates/default/includes/pages/product_info.php(13): require('/xx/xx/xx...')
#5 /xx/xx/xx/xx/product_info.php(25): require('/xx/xx/xx...')
#6 {main}
[15-May-2021 10:59:19 Europe/Paris] Exception: 4.8333 in /xx/xx/xx/xx/includes/system/versioned/1.0.8.2/currencies.php:52
Stack trace:
-
- Lead Developer
- Posts: 2656
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: 1.0.8.3 Questions / Comments / Concerns
I don't see the notice in that. There's a whole log entry and part of another, but not the notice. What you want to find is an entry with the Exception stack trace followed by the PHP Notice: A non well formed numeric value encountered in
Which suggests to me that it considers 4.8333 well formed. So that this would be one of the non-problematic entries.
-
- VIP Member
- Posts: 119
- Joined: Thu Oct 29, 2020 12:34 pm
- Has thanked: 11 times
- Been thanked: 4 times
Re: 1.0.8.3 Questions / Comments / Concerns
With that code the notice does not appear, without it it reappears so I do not understand. It shows up also in the customers order email confirmation beneath each product price
-
- Lead Developer
- Posts: 2656
- Joined: Tue Nov 05, 2019 6:02 pm
- Has thanked: 4 times
- Been thanked: 182 times
Re: 1.0.8.3 Questions / Comments / Concerns
You could try removing it and changing line 52 to
Code: Select all
return static::round(tep_add_tax((float)"$products_price", $products_tax), $this->currencies[$_SESSION['currency'] ?? DEFAULT_CURRENCY]['decimal_places']) * $quantity;