Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Strange problem regarding MODULE_ORDER_TOTAL_INSTALLED


Mosselmaniac

Recommended Posts

Hi all

 

i'm having serious problems. i rewrote the shipping_cart.php and checkout_confirmation.php. it is showing a matrix with 2 product options. inside the matrix it shows me the quantity of the product i ordered.

 

this is working great.

 

after finishing the order, i get a mail with the info i ordered. also good. however, when going to my account, i can't view my history. also, in the admin there is no info about the order.....

 

what's wrong? i started debugging and i saw that a table in the database was empty.

 

This table should be filled in here:

 

but $order_totals is empty!

 

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
						'title' => $order_totals[$i]['title'],
						'text' => $order_totals[$i]['text'],
						'value' => $order_totals[$i]['value'], 
						'class' => $order_totals[$i]['code'], 
						'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

 }

 

$order_totals is filled in the order_total.php.....

 

in the process function:

 

   function process() {
  $order_total_array = array();

	  print "0";


  if (is_array($this->modules)) {
	reset($this->modules);

	print "1";

	while (list(, $value) = each($this->modules)) {

		print "2";

	  $class = substr($value, 0, strrpos($value, '.'));

	  if ($GLOBALS[$class]->enabled) {
		$GLOBALS[$class]->process();

		print "3";

		for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) {

				print "4";

		  if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) {

				  print "5";

			$order_total_array[] = array('code' => $GLOBALS[$class]->code,
										 'title' => $GLOBALS[$class]->output[$i]['title'],
										 'text' => $GLOBALS[$class]->output[$i]['text'],
										 'value' => $GLOBALS[$class]->output[$i]['value'],
										 'sort_order' => $GLOBALS[$class]->sort_order);
		  }
		}
	  }
	}
  }

  return $order_total_array;
}

 

 

the print stuff is for debugging purposes. it goes down on if (is_array($this->modules)) {

 

 

so, this->modules is empty. that's filled in the constructor:

 

 function order_total() {
  global $language;

  if (defined('MODULE_ORDER_TOTAL_INSTALLED') && tep_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {

	$this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);

	reset($this->modules);
	while (list(, $value) = each($this->modules)) {
	  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
	  include(DIR_WS_MODULES . 'order_total/' . $value);

	  $class = substr($value, 0, strrpos($value, '.'));
	  $GLOBALS[$class] = new $class;
	}
  }
}

 

 

and here i go desperate :)

 

tep_not_null(MODULE_ORDER_TOTAL_INSTALLED) returns false for me,

if (defined('MODULE_ORDER_TOTAL_INSTALLED') will return true for me.

 

what shoulkd i do to get this working? if i get this owkring i think everything is solved.

 

thanks guys!

 

Mosselmaniac

Link to comment
Share on other sites

  • 3 years later...

Hi all

 

i'm having serious problems. i rewrote the shipping_cart.php and checkout_confirmation.php. it is showing a matrix with 2 product options. inside the matrix it shows me the quantity of the product i ordered.

 

this is working great.

 

after finishing the order, i get a mail with the info i ordered. also good. however, when going to my account, i can't view my history. also, in the admin there is no info about the order.....

 

what's wrong? i started debugging and i saw that a table in the database was empty.

 

This table should be filled in here:

 

but $order_totals is empty!

 

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
$sql_data_array = array('orders_id' => $insert_id,
						'title' => $order_totals[$i]['title'],
						'text' => $order_totals[$i]['text'],
						'value' => $order_totals[$i]['value'], 
						'class' => $order_totals[$i]['code'], 
						'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);

 }

 

$order_totals is filled in the order_total.php.....

 

in the process function:

 

   function process() {
  $order_total_array = array();

	  print "0";


  if (is_array($this->modules)) {
	reset($this->modules);

	print "1";

	while (list(, $value) = each($this->modules)) {

		print "2";

	  $class = substr($value, 0, strrpos($value, '.'));

	  if ($GLOBALS[$class]->enabled) {
		$GLOBALS[$class]->process();

		print "3";

		for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) {

				print "4";

		  if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) {

				  print "5";

			$order_total_array[] = array('code' => $GLOBALS[$class]->code,
										 'title' => $GLOBALS[$class]->output[$i]['title'],
										 'text' => $GLOBALS[$class]->output[$i]['text'],
										 'value' => $GLOBALS[$class]->output[$i]['value'],
										 'sort_order' => $GLOBALS[$class]->sort_order);
		  }
		}
	  }
	}
  }

  return $order_total_array;
}

 

 

the print stuff is for debugging purposes. it goes down on if (is_array($this->modules)) {

 

 

so, this->modules is empty. that's filled in the constructor:

 

 function order_total() {
  global $language;

  if (defined('MODULE_ORDER_TOTAL_INSTALLED') && tep_not_null(MODULE_ORDER_TOTAL_INSTALLED)) {

	$this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED);

	reset($this->modules);
	while (list(, $value) = each($this->modules)) {
	  include(DIR_WS_LANGUAGES . $language . '/modules/order_total/' . $value);
	  include(DIR_WS_MODULES . 'order_total/' . $value);

	  $class = substr($value, 0, strrpos($value, '.'));
	  $GLOBALS[$class] = new $class;
	}
  }
}

 

 

and here i go desperate :)

 

tep_not_null(MODULE_ORDER_TOTAL_INSTALLED) returns false for me,

if (defined('MODULE_ORDER_TOTAL_INSTALLED') will return true for me.

 

what shoulkd i do to get this working? if i get this owkring i think everything is solved.

 

thanks guys!

 

Mosselmaniac

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...