Jump to content

[SOLVED] browser return "The connection was reset" when call function getOrderTotal


Recommended Posts

i try to modified function getOrderShippingCost() (classes/Cart.php)  , but when i want to call function getOrderTotal() , my browser will return "The connection was reset".

 

Below is my code :

 

classes/Cart.php

Line 1187 +-

        // Apply tax
        if (isset($carrierTax))
            $shipping_cost *= 1 + ($carrierTax / 100);
        
        $orderTotal =  $this->getOrderTotal;  // browser will return "The connection was reset"

        /* some logic here 
        * check if orderTotal more than $39 and state is 33 shipping will free
        */
        
        return (float)(Tools::ps_round((float)($shipping_cost), 2));
    }

I think because this function 'getOrderShippingCost' already called in header and other places more than 20 times,  then when i call $this->getOrderTotal inside getOrderShippingCost()  server cannot handle then failed.

 

So how to solve this problem ? im using PS 1.4.4.1

 

Link to comment
Share on other sites

×
×
  • Create New...