Forums / All Other Contributions/Addons / migration of osc module - question

migration of osc module - question

Locked

Views: 1,031

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
2 Sep 2008, 10:52 AM
#1
fulltilt avatar

fulltilt

New Zenner

Join Date:
Sep 2006
Posts:
80
Plugin Contributions:
0

migration of osc module - question

i like to migrate osc payment module in zencart, there are some changes in ZC files, but i dont know how to find the right file and part ....

files need to be modified:

checkout_process.php
find  out line 
  // lets start with the email confirmation
    $email_order = STORE_NAME . "\n" . 

and add in front of it 
  //payment cetrel
  if($payment != 'cetrel'){ 

find out the line 
  // send emails to other people
    if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
      tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
    }
and add after it 
  //payment cetrel
  }

find the line 
  $cart->reset(true);
and add after 
  //payment cetrel
  if($payment == 'cetrel'){
       tep_redirect('https://pos.cetrel.lu/jsp'.(MODULE_PAYMENT_CETREL_MODE == 'Test' ? 'cert' : '').'/intro.jsp?merchid='.MODULE_PAYMENT_CETREL_MERCHANT_ID.'&amount='.number_format($order->info['total'] * $currencies->currencies[$order->info['currency']]['value'], $currencies->currencies[$order->info['currency']]['decimal_places'], $currencies->currencies[$order->info['currency']]['decimal_point'],'').'&msgnr=200&trefnum='.$insert_id.'&currency='.$order->info['currency'].'&currencylabel='.$currencies->currencies[$order->info['currency']]['title'].'&language='.$languages_code.'');
  }
  //end payment cetrel




includes/application_top.php
find out the line with 
      tep_session_register('language');
      tep_session_register('languages_id');
and add after it 
      tep_session_register('languages_code');
find 

    $language = $lng->language['directory'];
    $languages_id = $lng->language['id'];
add after it 
    $languages_code = $lng->language['code'];
2 Sep 2008, 7:46 PM
#4
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: migration of osc module - question

Sorry, I misunderstood.

I think you need to look at init_languages.php, there are the language and language_id stored into the session array. And I would search the Zen Cart files for "SEND_EXTRA_ORDER_EMAILS_TO" for example. But I can't easily say what exactly needs to be done.

3 Sep 2008, 6:56 AM
#5
fulltilt avatar

fulltilt

New Zenner

Join Date:
Sep 2006
Posts:
80
Plugin Contributions:
0

Re: migration of osc module - question

thanks paulm,
i try with init_languages.php the "SEND_EXTRA_ORDER_EMAILS_TO" i have found in /incl./modules/order.php hope thats the right one :-)

paulm:

I think you need to look at init_languages.php, there are the language and language_id stored into the session array. And I would search the Zen Cart files for "SEND_EXTRA_ORDER_EMAILS_TO" for example. But I can't easily say what exactly needs to be done.

3 Sep 2008, 9:28 AM
#6
fulltilt avatar

fulltilt

New Zenner

Join Date:
Sep 2006
Posts:
80
Plugin Contributions:
0

Re: migration of osc module - question

this part makes trouble:

if (is_object($order)) $this->update_status(); 
$this->form_action_url = 'checkout_process.php';

so we dont have this checkout_process.php in ZC ...
this Part needs to include in checkout_process.php:

find the line 
  $cart->reset(true);
and add after 
  //payment cetrel
  if($payment == 'cetrel'){
       tep_redirect('https://pos.cetrel.lu/jsp'.(MODULE_PAYMENT_CETREL_MODE == 'Test' ? 'cert' : '').'/intro.jsp?merchid='.MODULE_PAYMENT_CETREL_MERCHANT_ID.'&amount='.number_format($order->info['total'] * $currencies->currencies[$order->info['currency']]['value'], $currencies->currencies[$order->info['currency']]['decimal_places'], $currencies->currencies[$order->info['currency']]['decimal_point'],'').'&msgnr=200&trefnum='.$insert_id.'&currency='.$order->info['currency'].'&currencylabel='.$currencies->currencies[$order->info['currency']]['title'].'&language='.$languages_code.'');
  }
  //end payment cetrel

can i put it into the modul file instead of:
$this->form_action_url = 'checkout_process.php';

like:

if (is_object($order)) $this->update_status(); 
  //payment cetrel     zen_redirect('https://pos.cetrel.lu/jsp'.(MODULE_PAYMENT_CETREL_MODE == 'Test' ? 'cert' : '').'/intro.jsp?merchid='.MODULE_PAYMENT_CETREL_MERCHANT_ID.'&amount='.number_format($order->info['total'] * $currencies->currencies[$order->info['currency']]['value'], $currencies->currencies[$order->info['currency']]['decimal_places'], $currencies->currencies[$order->info['currency']]['decimal_point'],'').'&msgnr=200&trefnum='.$insert_id.'&currency='.$order->info['currency'].'&currencylabel='.$currencies->currencies[$order->info['currency']]['title'].'&language='.$languages_code.'');
  }
  //end payment cetrel