Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Moneris


1800contacts

Recommended Posts

Hi all,

 

I tried to create a new table in PhpMyAdmin by running the following sql file:

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)

);

 

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 "catalogincludesmodulespayment" folder on your web

server and rename it to "moneriseselectplus.php" (without "1" at the end).

2. Copy the "moneriseselectplus.php2" file to the "catalogincludeslanguagesenglishmodulespayment"

folder on your web server and rename it to "moneriseselectplus.php" (without "2" at the end).

3. Create a "moneris" folder in the "catalogincludes" folder.

4. Copy the "insert_moneris_orderid.php" file to the "catalogincludesmoneris" folder.

5. Add line

"define('TABLE_MONERIS_ORDERSIDS', 'moneris_orderids');"

into the

"catalogincludesapplication_top.php" and into the "catalogadminincludesapplication_top.php" files.

6. Add line

 "define('DIR_WS_MONERIS', DIR_WS_INCLUDES. 'moneris/');"

into the "catalogincludesconfigure.php" file.

7. Add code

$selected_processor = $payment_modules->selection();

if( $selected_processor[0]['id'] == 'moneriseselectplus' ) {

include( DIR_WS_MONERIS . 'insert_moneris_orderid.php');

}

to line 111 of the "catalogcheckout_process.php" file (After this section of 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);

}

---------------------------------------------------------------

8. Add 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>';

} ?>

to line 251 of the "catalogadminorders.php" file (After this section of 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>

---------------------------------------------------------------

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.

Richard da bomb

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...