Author Topic: [SOLVED] Adding variable in checkout.paymentradio.php  (Read 5441 times)

adam.hughes

  • Beginner
  • *
  • Posts: 17
[SOLVED] Adding variable in checkout.paymentradio.php
« on: February 23, 2006, 11:23:46 am »
I'm making a customisation in virtuemart which will allow the end user to enable or disable taking additional values when processing credit cards (such as start date and issue number)

I've come across a problem that I didn;t get in 1.01. I've added the folowing lines in chechout.paymentradio.php

Code: [Select]
<tr>
<td nowrap width="10%" align="right">
<?php 
echo $VM_LANG->_PHPSHOP_CHECKOUT_CONF_PAYINFO_ISSUENUMBER;
echo 
":";
 
?>

</td>
<td>
<input type="text" class="inputbox" id="order_payment_issuenumber" name="order_payment_issuenumber" value="<?php if(!empty($_SESSION['ccdata']['order_payment_issuenumber'])) echo $_SESSION['ccdata']['order_payment_issuenumber'?>" />
<?php
echo mm_ToolTip$VM_LANG->_PHPSHOP_CUSTOMER_ISSUENUMBBER_TOOLTIP); 
?>

</td>
</tr>

The code above works fine but the problem is that the new value for order_payment_issuenumber isn't being transfered to ps_checkout.php so when the following code is used
Code: [Select]
$_SESSION['ccdata']['order_payment_issuenumber'] = @$d['order_payment_issuenumber'];

The value in the ccdata array to set to 0
I can't seem to find why the value in the form in page checout.paymentradio.php is being ignored.

adam.hughes

  • Beginner
  • *
  • Posts: 17
Re: [SOLVED] Adding variable in checkout.paymentradio.php
« Reply #1 on: February 28, 2006, 08:56:13 am »
I was mistaken in beliving that the $d variable was set as a global. I have changed all the references to the $d variable to the $_SESSION["ccdata"]["XXXXXX"] variable in the session and this works fine.

I will post the changes to the forum and request Soreen if he could put it in the next release of VM.