Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[HELP!] Cannot redeclare _sess_open()


Guest

Recommended Posts

I have a problem, I use a special module to pay, and the CreditCard company gets his information from this file:

 

<?php

 require('includes/application_top.php');





 if ($HTTP_GET_VARS['order']) {

   $query = tep_db_query("select sessionid from payments where id = '" . $HTTP_GET_VARS['order'] . "'");

   $values = tep_db_fetch_array($query);

   $ocsid = $values['sessionid'];

   require('pm4b_cart4.php');



 } else {

   require('includes/classes/order.php');

   $order = new order;



   Header('Content-type: text/plain');

   echo 'M978' . ($order->info['total'] * 100) . "n <br>";

   echo sizeof($order->products) . "n <br>";

   for ($i=0; $i<sizeof($order->products); $i++) {

     echo $order->products[$i]['model'] . "n <br>";

     echo $order->products[$i]['name'] . "n <br>";

     echo $order->products[$i]['qty'] . "n <br>";

     echo tep_add_tax($order->products[$i]['final_price'], tep_get_tax_rate($order->products[$i]['id'])) * 100 . "n <br>";

   }

 }

?>

This file doesnt work, I get the error:

 

Fatal error: Cannot redeclare _sess_open() (previously declared in /home/discsmoke/ssl.discountsmoking.net/catalog/includes/functions/sessions.php:18) in /home/discsmoke/ssl.discountsmoking.net/catalog/includes/functions/sessions.php on line 18

 

 

But when I had:

 

 require(tep_href_link('pm4b_cart.php', tep_session_name() . '=' . $values['sessionid'], 'NONSSL', false, false));

 

instead of:

 

    $ocsid = $values['sessionid'];

   require('pm4b_cart4.php');

 

it did work!

But i need the one I use now, because of SSL cant include files with a variable behind the filename...

 

Anyone knows the solution fir this problem?

Link to comment
Share on other sites

Anyone knows the solution fir this problem?

 

I guess you are going to need to edit the 'pm4b_cart4.php' module to fit into osCommerce.

 

If you look at the existing modules and also some contributed modules you should be able to convert it quite easily :)

Mark Evans

osCommerce Monkey & Lead Guitarist for "Sparky + the Monkeys" (Album on sale in all good record shops)

 

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

Software is like sex: It's better when it's free. (Linus Torvalds)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...