Jump to content

[SOLVED] PHP bug? Or no?


AlexanderTheGr

Recommended Posts

Hi there

 

I need your help

 

I am developing a online shop and a have a small problem

 

Here is the code

class orders {
.
.
.
    function shipping_price() {
    .....
    }
    function saturday_deliv_price() {
    .....
    }
    function count_basket_total_price_items() {
    .....
    }

function count_total_basket_price() {
	$shipping_price = $this->shipping_price();
	$saturday_deliv_price = $this->saturday_deliv_price();
	$count_basket_total_price_items = $this->count_basket_total_price_items();
	return $shipping_price+$saturday_deliv_price+$count_basket_total_price_items;
}
.
.
.
}

 

Then i call count_total_basket_price()

 

class template {
.
.
.
.

function top_header_my_basket() {
	echo "Price:".orders::count_total_basket_price()."€";
}
.
.
.
.

}

 

And i am receiving that error message

 

Fatal error: Call to undefined method template::shipping_price() in ....../orders.class.php on line 80

 

It seems shipping_price which is part of orders class runs via template class. And i think  that not suppose to happent

 

any idea?

Link to comment
https://forums.phpfreaks.com/topic/129197-solved-php-bug-or-no/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.