Jump to content

[SOLVED] How to get order reference in bankwire.php


Recommended Posts

Hello guys, 

 

i need make own extra_mail_var from order-reference in function __construct() of bankwire.php

Something as:

public function __construct()
{
  $reference = HOW TO GET IT HERE?;    

  if (isset($reference) && !empty($reference)){
    $a = array ( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" );
    $b = array ( "1", "2", "3", "4", "5", "6", "7", "8", "9", "1", "2", "3", "4", "5", "6", "7", "8", "9", "1", "2", "3", "4", "5", "6", "7", "8" );
    $reference_number = str_replace($a,$b,$reference);
  }

  $this->extra_mail_vars = array(
    '{reference_number}' => $reference_number,
  	'{bankwire_owner}' => Configuration::get('BANK_WIRE_OWNER'),
  	'{bankwire_details}' => nl2br(Configuration::get('BANK_WIRE_DETAILS')),
  	'{bankwire_address}' => nl2br(Configuration::get('BANK_WIRE_ADDRESS'))
  	);
  }   
}

How to get order_reference (order_name) on this place?

I try $order->reference, $params['objOrder']->reference, $order->getUniqReference(), nothing works :(

PLEASE help ... (and sorry for my bad english).

Edited by B@JTík (see edit history)
  • Like 1
Link to comment
Share on other sites

Now I change letters references to numbers globaly for all PrestaShop (strtoupper(Tools::passwdGen(9, 'NO_NUMERIC')); to strtoupper(Tools::passwdGen(9, 'NUMERIC')); in classes/order/Order.php) and think is SOLVED for me.

Link to comment
Share on other sites

  • 5 months later...
×
×
  • Create New...