Help for module shipping

antonio <[email protected]>
Newsgroups gmane.comp.web.oscommerce.features
Message-ID <1dfdec1d30b34cd5bf78b694d6bc25bf@osCommerce-Forums>
This message was sent from: Features
http://forums.oscommerce.com/viewtopic.php?p=162274#162274
----------------------------------------------------------------

Excused for my English 

I have added this code to the module flat1 :
function flat2() {
      global $order, $cart;

      $this->code = 'flat2';
      $this->title = MODULE_SHIPPING_flat2_TEXT_TITLE;
      $this->description = MODULE_SHIPPING_flat2_TEXT_DESCRIPTION;
      $this->sort_order = MODULE_SHIPPING_flat2_SORT_ORDER;
      $this->icon = '';
      $this->tax_class = MODULE_SHIPPING_flat2_TAX_CLASS;
      $this->enabled = ((MODULE_SHIPPING_flat2_STATUS == 'True') ? true : false);

      $totale= $cart->show_total();// this is new code
      if ($totale > 150.00){
	  $this->enabled = ((MODULE_SHIPPING_flat1_STATUS == 'False') ? true : false);;}// end new code

Cause an error in admin while in catalog is ok .

the error causat in admin is :
Fatal error: Call to a member function on a non-object in c:\programmi\easyphp\www\umbriastyle\shop\catalog\includes\modules\shipping\flat1.php on line 29
 while?   
Grazie Antonio
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.