B@JTík Posted June 26, 2014 Share Posted June 26, 2014 (edited) 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 June 26, 2014 by B@JTík (see edit history) 1 Link to comment Share on other sites More sharing options...
B@JTík Posted June 26, 2014 Author Share Posted June 26, 2014 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 More sharing options...
peterke91 Posted November 26, 2014 Share Posted November 26, 2014 I still have to get the reference! if i write $order = Order::getOrderByCartId($cartId); i get the ID, but how can i get from here the refence? Link to comment Share on other sites More sharing options...
Recommended Posts