Moneris

1800contacts <[email protected]>
Newsgroups gmane.comp.web.oscommerce.general
Message-ID <4110d78be424896fff5ce69b8b61780a@osCommerce-Forums>
This message was sent from: General Support
http://forums.oscommerce.com/viewtopic.php?p=227191#227191
----------------------------------------------------------------

Hi all,

I tried to create a new table in PhpMyAdmin by running the following sql file:
[code]DROP TABLE IF EXISTS moneris_orderids;
CREATE TABLE moneris_orderids (
  moneris_orderid varchar(99) NOT NULL,
  orders_id int NOT NULL,
  response_variables BLOB NOT NULL,
  PRIMARY KEY (orders_id, moneris_orderid),
  KEY idx_moneris_orderids_orders_id (orders_id)
);[/code]

In PhpMyAdmin, I clicked on the database name then click on SQL. After that, I browsed my hard drive for the above sql file in my hard drive and then under 'Compression'. I clicked 'Autodetect'. After I did that, I followed as per the moneris documentation by doing the following changes:

1. Copy the "moneriseselectplus.php1" file to the "\catalog\includes\modules\payment" folder on your web
server and rename it to "moneriseselectplus.php" (without "1" at the end).
2. Copy the "moneriseselectplus.php2" file to the "\catalog\includes\languages\english\modules\payment"
folder on your web server and rename it to "moneriseselectplus.php" (without "2" at the end).
3. Create a "moneris" folder in the "\catalog\includes\" folder.
4. Copy the "insert_moneris_orderid.php" file to the "\catalog\includes\moneris" folder.
5. Add line [code]"define('TABLE_MONERIS_ORDERSIDS', 'moneris_orderids');" [/code]into the
"\catalog\includes\application_top.php" and into the "\catalog\admin\includes\application_top.php" files.
6. Add line
[code] "define('DIR_WS_MONERIS', DIR_WS_INCLUDES. 'moneris/');" [/code]
into the "\catalog\includes\configure.php" file.
7. Add code
[code]$selected_processor = $payment_modules->selection();
if( $selected_processor[0]['id'] == 'moneriseselectplus' ) {
include( DIR_WS_MONERIS . 'insert_moneris_orderid.php');
}[/code]
to line 111 of the "\catalog\checkout_process.php" file (After this section of code):
---------------------------------------------------------------
[code]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'],
eSelect plus - osCommerce Shopping Cart June 10, 2003
Page 4 of 11
'class' => $order_totals[$i]['code'],
'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
}[/code]
---------------------------------------------------------------
8. Add code
[code]<?php
//Phet - Show eSelect Plus Order ID.
$eSelectPlus_order_id_query = tep_db_query("select moneris_orderid from " .
TABLE_MONERIS_ORDERIDS . " where orders_id = " . tep_db_input($oID) );
if (tep_db_num_rows($eSelectPlus_order_id_query)) {
echo ' <tr>' . "\n" .
' <td class="main">' . "\n" .
' <table border="1" cellspacing="0" cellpadding="5">' . "\n" .
' <tr>' . "\n" .
' <td class="smallText" align="center"><b>eSelect Plus Order ID</b></td>' . "\n" .
' </tr>';
while ($eSelectPlus_order_id = tep_db_fetch_array($eSelectPlus_order_id_query)) {
echo ' <tr>' . "\n" .
' <td class="smallText" align="center">' . $eSelectPlus_order_id['moneris_orderid'] . '</td>' .
"\n" .
' </tr>' . "\n";
}
echo ' </table>' . "\n" .
' </td>' . "\n" .
' </tr>';
} ?>[/code]to line 251 of the "\catalog\admin\orders.php" file (After this section of code):
---------------------------------------------------------------
[code]<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>[/code]
---------------------------------------------------------------
Unfortunately, as a result of the changes i made, the site went blank. I don't think the problem lies in changes of the file but most likely it's the way that i upload the sql file in phpmyadmin.
Can anyone please tell me how can I fix the above problem? Thanks.
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.