Author Topic: Error after Update in calculationh.php  (Read 1241 times)

Marquis2000

  • Beginner
  • *
  • Posts: 3
  • A beginner
Error after Update in calculationh.php
« on: January 04, 2021, 13:58:45 pm »
Hi Guys,

i have follow problem after last update. I hope u can help.
But im not the only user with this problem:

I become follow error in frontend:

Notice: Undefined index: subTotal in
administrator/components/com_virtuemart/helpers/calculationh.php on line 886

In this line is follow code:

//When the rule got not active, we remove the rule
      foreach ($this->_cart->cartData['DATaxRulesBill'] as $k=>&$rule) {
         vmdebug('calc_categories $darule[\'subTotal\'] ',$rule['subTotal']);
         if(empty($rule['subTotal'])){
            unset($this->_cart->cartData['DATaxRulesBill'][$k]);
         }
      }

And on the checkout:

Notice: Undefined index: taxAmount in /www/htdocs/w01ad8fe/fantasticbaits.de/components/com_virtuemart/helpers/cart.php on line 2489
Notice: Undefined index: priceWithoutTax in /www/htdocs/w01ad8fe/fantasticbaits.de/components/com_virtuemart/helpers/cart.php on line 2490
Notice: Undefined index: discountedPriceWithoutTax in /www/htdocs/w01ad8fe/fantasticbaits.de/components/com_virtuemart/helpers/cart.php on line 2491

in the lines follow codes:

      $data->billTotal_tax_amount = $currencyDisplay->priceDisplay( $this->cartPrices['taxAmount'] );
      $data->billTotal_net = $currencyDisplay->priceDisplay( $this->cartPrices['priceWithoutTax'] );
      $data->billTotal_discounted_net = $currencyDisplay->priceDisplay( $this->cartPrices['discountedPriceWithoutTax'] );

Can anyone help please?

Greatings



jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28197
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

Marquis2000

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: Error after Update in calculationh.php
« Reply #2 on: January 04, 2021, 16:45:03 pm »
OK i have error messages deactivatet.

Thanks jenkin hill

Greatings

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 570
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: Error after Update in calculationh.php
« Reply #3 on: January 04, 2021, 17:38:34 pm »
Thanks for reporting these Notices.
Notices have the tendency to become problems in later versions of PHP, so it is good to address them.

Can you please add the information from which version to which version you updated?
The PHP-Version is interesting too.

Thanks
Stefan
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.