News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

helpers\calculationh.php on line 1214

Started by Marquis2000, November 01, 2020, 10:37:46 AM

Previous topic - Next topic

Marquis2000

Hi Guys,

i have a error in pricing configuration. but i dont know what this ist. Has Anyone same Problem?

Warning: Creating default object from empty value in .....\administrator\components\com_virtuemart\helpers\calculationh.php on line 1214

in this line stay:

      $price = $baseprice;
      $finalprice = $baseprice;
      if (isset($rulesEffSorted)) {

         foreach ($rulesEffSorted as $rule) {

            if(isset($rule['subTotal'])){
               $cIn = $rule['subTotal'];
            }
            else if ($relateToBaseAmount) {
               $cIn = $baseprice;
            } else {
               $cIn = $price;
            }

            $cOut = $this->interpreteMathOp($rule, $cIn);
            $tmp = $this->roundInternal($this->roundInternal($cOut) - $cIn);

            if($setCartPrices){
               $this->_cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'] = $tmp;
            }
            //okey, this is a bit flawless logic, but should work
            if ($relateToBaseAmount) {
               $finalprice = $finalprice + $tmp;
            } else {
               $price = $cOut;
            }
         }
      }

      //okey done with it
      if (!$relateToBaseAmount) {
         $finalprice = $price;
      }

      return $finalprice;
   }

Can anyone help?

Greatings Norman

Jörgen

Probably a PHP upgrade error. You för not tell much of yout Joomla, PHP, VM versions...

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

sirius

Hi
I assume this is now fixed
like so :
if($setCartPrices and isset($this->_cart->cartPrices)){
$this->_cart->cartPrices[$rule['virtuemart_calc_id'] . 'Diff'] = $tmp;
}
J3.10.12 | PHP 7.4.33 + APC + Opcode
VM Prod : 3.8.6 | VM Test : 4.4.0.11095