Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help for module shipping


Guest

Recommended Posts

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:programmieasyphpwwwumbriastyleshopcatalogincludesmodulesshippingflat1.php on line 29

while?

Grazie Antonio

Link to comment
Share on other sites

Make the IF call a function to validate the $this->enable ... then make an identical function in the Admin that always returns true and it will eliminate the error.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...