Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Pass Variable To Checkout_process.php


magnastik

Recommended Posts

Hi!

 

I've a variable in checkout_confirmation.php that i want to pass to checkout_process.php to insert in orders database field that i added.

 

How can i do that? The variables aren't in a form, so how do i pass it?

 

Thanks in advance,

MagNastiK

Link to comment
Share on other sites

Put the variable in a hidden field within the checkout_confirmation.php <form></form>

 

Like so ... (before the submit button)

 

tep_draw_hidden_field('pass_var', $myvariable);

 

and read it in checkout_process.php like ..

 

$my_new_var = '';
if (isset($_POST['pass_var']))
$my_new_var = $_POST['pass_var'];

Link to comment
Share on other sites

Thank you!

But know i can't insert this variable in the ORDERS table.

 

The variable i'm passing is the "shipping" that i get from a custom code, but i need to insert the value into a new field i create in ORDERS table.

In checkou_process.php in only see the UPDATE statement, where is the INSERT?

 

Cya,

MagNastiK

Link to comment
Share on other sites

Use phpMyAdmin (If you have it) to add a new field to the orders table. (backup before making DB changes)

Link to comment
Share on other sites

The insert happens here:

 

tep_db_perform(TABLE_ORDERS, $sql_data_array);

 

You need to add your new data to the $sql_data_array array.

Ok!

 

I understand but look at my code:

  $sql_data_array = array('customers_id' => $customer_id,
					  'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
					  'customers_company' => $order->customer['company'],
					  'customers_street_address' => $order->customer['street_address'],
					  'customers_suburb' => $order->customer['suburb'],
					  'customers_city' => $order->customer['city'],
					  'customers_postcode' => $order->customer['postcode'], 
					  'customers_state' => $order->customer['state'], 
					  'customers_country' => $order->customer['country']['title'], 
					  'customers_telephone' => $order->customer['telephone'], 
					  'customers_email_address' => $order->customer['email_address'],
					  'customers_address_format_id' => $order->customer['format_id'], 
					  'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
					  'delivery_company' => $order->delivery['company'],
					  'delivery_street_address' => $order->delivery['street_address'], 
					  'delivery_suburb' => $order->delivery['suburb'], 
					  'delivery_city' => $order->delivery['city'], 
					  'delivery_postcode' => $order->delivery['postcode'], 
					  'delivery_state' => $order->delivery['state'], 
					  'delivery_country' => $order->delivery['country']['title'], 
					  'delivery_address_format_id' => $order->delivery['format_id'], 
					  'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 
					  'billing_company' => $order->billing['company'],
					  'billing_street_address' => $order->billing['street_address'], 
					  'billing_suburb' => $order->billing['suburb'], 
					  'billing_city' => $order->billing['city'], 
					  'billing_postcode' => $order->billing['postcode'], 
					  'billing_state' => $order->billing['state'], 
					  'billing_country' => $order->billing['country']['title'], 
					  'billing_address_format_id' => $order->billing['format_id'], 
					  'payment_method' => $order->info['payment_method'], 
					  'cc_type' => $order->info['cc_type'], 
					  'cc_owner' => $order->info['cc_owner'], 
					  'cc_number' => $order->info['cc_number'], 
					  'cc_expires' => $order->info['cc_expires'], 
					  'date_purchased' => 'now()', 
					  'orders_status' => $order->info['order_status'], 
					  'currency' => $order->info['currency'], 
					  'currency_value' => $order->info['currency_value']);
 tep_db_perform(TABLE_ORDERS, $sql_data_array);

 

I don't see the values that will be inserted in ORDERS table. Do you think i only need to add to the array this code?

 

'myVar' => $order->orders['myVar'],

 

Thanks,

MagNastiK

Link to comment
Share on other sites

To the left of the => should be the name of your new column in the orders table, and to the right of the => should be the variable that your shipping value is in. So, if you did

 

$my_new_var = '';
if (isset($_POST['pass_var']))
$my_new_var = $_POST['pass_var'];

 

like Babygurgles said, then it would look like this:

 

'myVar_1' => $my_new_var,

Link to comment
Share on other sites

To the left of the => should be the name of your new column in the orders table, and to the right of the => should be the variable that your shipping value is in. So, if you did

 

$my_new_var = '';
if (isset($_POST['pass_var']))
$my_new_var = $_POST['pass_var'];

 

like Babygurgles said, then it would look like this:

 

'myVar_1' => $my_new_var,

 

Well... i followed all steps but i can't pass the variavel... i don't kniow why.

 

Code in checkout_confirmation.php

<?php
 if (isset($$payment->form_action_url)) {
$form_action_url = $$payment->form_action_url;
 } else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 }

 echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

 if (is_array($payment_modules->modules)) {
echo $payment_modules->process_button();
 }
 tep_draw_hidden_field('envio', $envio);
 echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . '</form>' . "\n";
?>

 

And the code in checkout_process.php:

$valor_shipping = 1.23;
 if (isset($_REQUEST['envio']))
 $valor_shipping = $_REQUEST['envio'];

 $sql_data_array = array('customers_id' => $customer_id,
					  'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
					  'customers_company' => $order->customer['company'],
					  'customers_street_address' => $order->customer['street_address'],
					  'customers_suburb' => $order->customer['suburb'],
					  'customers_city' => $order->customer['city'],
					  'customers_postcode' => $order->customer['postcode'], 
					  'customers_state' => $order->customer['state'], 
					  'customers_country' => $order->customer['country']['title'], 
					  'customers_telephone' => $order->customer['telephone'], 
					  'customers_email_address' => $order->customer['email_address'],
					  'customers_address_format_id' => $order->customer['format_id'], 
					  'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 
					  'delivery_company' => $order->delivery['company'],
					  'delivery_street_address' => $order->delivery['street_address'], 
					  'delivery_suburb' => $order->delivery['suburb'], 
					  'delivery_city' => $order->delivery['city'], 
					  'delivery_postcode' => $order->delivery['postcode'], 
					  'delivery_state' => $order->delivery['state'], 
					  'delivery_country' => $order->delivery['country']['title'], 
					  'delivery_address_format_id' => $order->delivery['format_id'], 
					  'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 
					  'billing_company' => $order->billing['company'],
					  'billing_street_address' => $order->billing['street_address'], 
					  'billing_suburb' => $order->billing['suburb'], 
					  'billing_city' => $order->billing['city'], 
					  'billing_postcode' => $order->billing['postcode'], 
					  'billing_state' => $order->billing['state'], 
					  'billing_country' => $order->billing['country']['title'], 
					  'billing_address_format_id' => $order->billing['format_id'], 
					  'payment_method' => $order->info['payment_method'], 
					  'cc_type' => $order->info['cc_type'], 
					  'cc_owner' => $order->info['cc_owner'], 
					  'cc_number' => $order->info['cc_number'], 
					  'cc_expires' => $order->info['cc_expires'], 
					  'date_purchased' => 'now()', 
					  'orders_status' => $order->info['order_status'], 
					  'currency' => $order->info['currency'], 
					  'currency_value' => $order->info['currency_value'],
					  'valor_shipping' => $valor_shipping);
 tep_db_perform(TABLE_ORDERS, $sql_data_array);

 

I don't understand what's wrong... but every time a try to checkout an order the shipping value in table ORDERS will get always '1.23' that's the value i initialize the variable with.

 

Hope someone can give an hand...

 

Cya,

MagNastiK

Link to comment
Share on other sites

Just for a check change

 

tep_draw_hidden_field('envio', $envio);

 

to

 

tep_draw_hidden_field('envio', '2.5');

 

and let me know if it shows 2.5

Link to comment
Share on other sites

Odd

 

Change the previous mod back then change ..

 

  if (isset($_REQUEST['envio']))
 $valor_shipping = $_REQUEST['envio'];

to

 

if (isset($_REQUEST['envio'])) {
 $valor_shipping = $_REQUEST['envio'];
 echo 'The $envio variable was in $_POST and contained ' . $_REQUEST['envio'] . '<br />';
} else echo 'The $envio variable was not in $_POST<br />';

 

and see what the script prints

Link to comment
Share on other sites

BTW I'm with you for a bit now so if you react promptly to posts I'll follow up promptly for a bit.

Link to comment
Share on other sites

The $envio variable was not in $_POST

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ssantos/public_html/shop/checkout_process.php:61) in /home/ssantos/public_html/shop/includes/functions/general.php on line 29

 

magnastik

Link to comment
Share on other sites

and if you change to ..

 

if (isset($_POST['envio'])) {
 $valor_shipping = $_POST['envio'];
 echo 'The $envio variable was in $_POST and contained ' . $_POST['envio'] . '<br />';
} else echo 'The $envio variable was not in $_POST<br />';

Link to comment
Share on other sites

The $envio variable was not in $_POST

 

Warning: Cannot modify header information - headers already sent by (output started at /home/ssantos/public_html/shop/checkout_process.php:61) in /home/ssantos/public_html/shop/includes/functions/general.php on line 29

 

AGAIN!!!

 

could it be the tep_draw_hidden_field('envio', '2.50');???

 

tnxx,

magnastik

Link to comment
Share on other sites

Link to comment
Share on other sites

I think the problem is here ...

 

  if (isset($$payment->form_action_url)) {
$form_action_url = $$payment->form_action_url;
 } else {
$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 }

 

I've never looked at this before so should be interesting ..

 

Seems you are redirected to FILENAME_CHECKOUT_PROCESS UNLESS you are redirected to a payment module

 

So it seems we are trying to collect an $_POST variable at FILENAME_CHECKOUT_PROCESS when we should be collecting it at the payment module itself.

 

Which payment module are you testing with?

Link to comment
Share on other sites

Link to comment
Share on other sites

i'm using Money Order and Bank Tranfer modules

 

Modey Order module CODE:

<?php
/*
 $Id: moneyorder.php,v 1.10 2003/01/29 19:57:14 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class moneyorder {
var $code, $title, $description, $enabled;

// class constructor
function moneyorder() {
  global $order;

  $this->code = 'moneyorder';
  $this->title = MODULE_PAYMENT_MONEYORDER_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION;
  $this->sort_order = MODULE_PAYMENT_MONEYORDER_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);

  if ((int)MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID;
  }

  if (is_object($order)) $this->update_status();

  $this->email_footer = MODULE_PAYMENT_MONEYORDER_TEXT_EMAIL_FOOTER;
}

// class methods
function update_status() {
  global $order;

  if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_MONEYORDER_ZONE > 0) ) {
	$check_flag = false;
	$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_MONEYORDER_ZONE . "' and zone_country_id = '" . $order->billing['country']['id'] . "' order by zone_id");
	while ($check = tep_db_fetch_array($check_query)) {
	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  } elseif ($check['zone_id'] == $order->billing['zone_id']) {
		$check_flag = true;
		break;
	  }
	}

	if ($check_flag == false) {
	  $this->enabled = false;
	}
  }
}

function javascript_validation() {
  return false;
}

function selection() {
  return array('id' => $this->code,
			   'module' => $this->title);
}

function pre_confirmation_check() {
  return false;
}

function confirmation() {
  return array('title' => MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION);
}

function process_button() {
  return false;
}

function before_process() {
  return false;
}

function after_process() {
  return false;
}

function get_error() {
  return false;
}

function check() {
  if (!isset($this->_check)) {
	$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_MONEYORDER_STATUS'");
	$this->_check = tep_db_num_rows($check_query);
  }
  return $this->_check;
}

function install() {
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Check/Money Order Module', 'MODULE_PAYMENT_MONEYORDER_STATUS', 'True', 'Do you want to accept Check/Money Order payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now());");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Make Payable to:', 'MODULE_PAYMENT_MONEYORDER_PAYTO', '', 'Who should payments be made payable to?', '6', '1', now());");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_MONEYORDER_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
}

function remove() {
  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

function keys() {
  return array('MODULE_PAYMENT_MONEYORDER_STATUS', 'MODULE_PAYMENT_MONEYORDER_ZONE', 'MODULE_PAYMENT_MONEYORDER_ORDER_STATUS_ID', 'MODULE_PAYMENT_MONEYORDER_SORT_ORDER', 'MODULE_PAYMENT_MONEYORDER_PAYTO');
}
 }
?>

 

And Bank Transfer module CODE:

<?php
/*
 $Id: transferencia.php, 10/16/2004

 O download do módulo deposito/transferência bancária
  pode ser efetuado em http://www.phpmania.org

 Copyright (c) 2004 PHPmania.org <[email protected]>

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com
 Copyright (c) 2003 osCommerce
  osCommerce 2.2 Milestone 2 BR Por PHPmania.org

*/

 class transferencia {
var $code, $title, $description, $enabled;

// class constructor
function transferencia() {

  global $order;
  $this->code = 'transferencia';
  $this->title = MODULE_PAYMENT_TRANSFERENCIA_TEXT_TITLE;
  $this->description = MODULE_PAYMENT_TRANSFERENCIA_TEXT_DESCRIPTION;
  $this->email_footer =MODULE_PAYMENT_TRANSFERENCIA_TEXT_CONFIRMATION .
						"\n\nDados para depósito\\transferência:\n" .
						MODULE_PAYMENT_TRANSFERENCIA_TITULAR . "\n" .
						"Banco: " . MODULE_PAYMENT_TRANSFERENCIA_BANCO . "\n" .
						"NIB: " . MODULE_PAYMENT_TRANSFERENCIA_AGENCIA . "\n" .
						"IBAN: " . MODULE_PAYMENT_TRANSFERENCIA_CC . "\n\n";
  $this->sort_order = MODULE_PAYMENT_TRANSFERENCIA_SORT_ORDER;
  $this->enabled = ((MODULE_PAYMENT_TRANSFERENCIA_STATUS == 'True') ? true : false);

  if ((int)MODULE_PAYMENT_TRANSFERENCIA_ORDER_STATUS_ID > 0) {
	$this->order_status = MODULE_PAYMENT_TRANSFERENCIA_ORDER_STATUS_ID;
  }

  if (is_object($order)) $this->update_status();
}

// class methods
function update_status() {
  global $order;

  if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_TRANSFERENCIA_ZONE > 0) ) {
	$check_flag = false;
	$check_query = tep_db_query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_PAYMENT_NZ_BANK_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
	while ($check = tep_db_fetch_array($check_query)) {
	  if ($check['zone_id'] < 1) {
		$check_flag = true;
		break;
	  } elseif ($check['zone_id'] == $order->delivery['zone_id']) {
		$check_flag = true;
		break;
	  }
	}

	if ($check_flag == false) {
	  $this->enabled = false;
	}
  }
 }

function javascript_validation() {
  return false;
}

function selection() {
  return array('id' => $this->code,
			   'module' => $this->title);
}

function pre_confirmation_check() {
  return false;
}

function confirmation() {
  return array('title' => MODULE_PAYMENT_TRANSFERENCIA_TEXT_CONFIRMATION . "\n<pre>\nDados para depósito\\transferência:\n" . MODULE_PAYMENT_TRANSFERENCIA_TITULAR . "\n" . "Banco: " . MODULE_PAYMENT_TRANSFERENCIA_BANCO . "\n" . "NIB: " . MODULE_PAYMENT_TRANSFERENCIA_AGENCIA . "\n" . "IBAN: " . MODULE_PAYMENT_TRANSFERENCIA_CC . "\n</PRE>");
}

function process_button() {
  return false;
}

function before_process() {
  return false;
}

function after_process() {
  return false;
}

function get_error() {
  return false;
}

function check() {
  if (!isset($this->_check)) {
	$check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_TRANSFERENCIA_STATUS'");
	$this->_check = tep_db_num_rows($check_query);
  }
  return $this->_check;
}

function install() {
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Ativar o módulo Transferência', 'MODULE_PAYMENT_TRANSFERENCIA_STATUS', 'True', '', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Mensagem (Opções de Pagamento)', 'MODULE_PAYMENT_TRANSFERENCIA_TEXT_SELECTION', 'Depósito/Transferência Bancária (nome do banco aqui)', 'Texto a ser exibido para o cliente na tela do opções de pagamento:', '6', '4', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Mensagem (Instruções para o Cliente)', 'MODULE_PAYMENT_TRANSFERENCIA_TEXT_CONFIRMATION', 'Seu pedido será enviado quando confirmado o pagamento. Para agilizar o processo, envie o comprovante por fax: (xx)xxxx-xxxx ou email: [email protected].', 'Texto a ser exibido para o cliente na confirmação da compra', '6', '5', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Titular da Conta Bancária', 'MODULE_PAYMENT_TRANSFERENCIA_TITULAR', 'PHPmania Ltda.', 'Titular da Conta Bancária', '6', '3', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Nome do Banco', 'MODULE_PAYMENT_TRANSFERENCIA_BANCO', 'Seu Banco', 'Nome do Banco', '6', '4', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('NIB', 'MODULE_PAYMENT_TRANSFERENCIA_AGENCIA', 'xxxx-x', 'NIB', '6', '5', now())");
  tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('IBAN', 'MODULE_PAYMENT_TRANSFERENCIA_CC', 'xxxxx-x', 'IBAN', '6', '2', now())");
   tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Status dos pedidos', 'MODULE_PAYMENT_TRANSFERENCIA_ORDER_STATUS_ID', '0', 'Atualiza o status dos pedidos efetuados por este módulo de pagamento para este valor.', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
   tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Ordem de exibição.', 'MODULE_PAYMENT_TRANSFERENCIA_SORT_ORDER', '0', 'Ordem de exibição', '6', '0', now())");


  }


function remove() {
  tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')");
}

function keys() {
  return array('MODULE_PAYMENT_TRANSFERENCIA_STATUS', 'MODULE_PAYMENT_TRANSFERENCIA_TEXT_SELECTION', 'MODULE_PAYMENT_TRANSFERENCIA_TEXT_CONFIRMATION', 'MODULE_PAYMENT_TRANSFERENCIA_TITULAR', 'MODULE_PAYMENT_TRANSFERENCIA_BANCO', 'MODULE_PAYMENT_TRANSFERENCIA_AGENCIA', 'MODULE_PAYMENT_TRANSFERENCIA_CC', 'MODULE_PAYMENT_TRANSFERENCIA_ORDER_STATUS_ID', 'MODULE_PAYMENT_TRANSFERENCIA_SORT_ORDER');

}
 }
?>

 

 

Hope it helps...

 

magnastik

Link to comment
Share on other sites

Hmmm

 

You are trying to bypass the whole shipping system by adding the variable $envio.

 

Do you really want to hardcode shipping to this one variable?

Link to comment
Share on other sites

Well i think this is "dirty"

 

but replace

 

tep_draw_hidden_field('pass_var', $myvariable);

 

with

 

$envio = 1.23;
tep_session_register['envio'];

 

 

Then in checkout_process.php

 

$valor_shipping = '';
if (isset($_REQUEST['envio']))
$valor_shipping = $_REQUEST['envio'];

 

change to ..

 

  $valor_shipping = '';
 if (isset($_SESSION['envio'])) {
 $valor_shipping = $_SESSION['envio'];
 tep_session_unregister('envio');
 }

Link to comment
Share on other sites

Well i think this is "dirty"

 

but replace

 

tep_draw_hidden_field('pass_var', $myvariable);

 

with

 

$envio = 1.23;
tep_session_register['envio'];

 

tep_session_register is an array?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...