Jump to content

order number on the order page


ultraxa

Recommended Posts

this is orderqrcode.php

<?php
class order_qrcode extends Module {
private $_html = '';
private $_postErrors = array();

function __construct()
   {
    $this->name = 'order_qrcode';
    $this->version = 0.1;
 $this->tab = 'AdminOrders';
 $this->page = basename(__FILE__, '.php');
    parent::__construct();

    $this->displayName = $this->l('QRcode order');
    $this->description = $this->l('Affiche un QRcode sur les commandes');
   }
function install()
{
 if (!parent::install() OR !$this->registerHook('adminOrder') OR !Configuration::updateValue('EXPINET_TOKEN', 'mytoken'))
  return false;
}

   function uninstall()
   {
    if (!parent::uninstall() OR !Configuration::deleteByName('EXPINET_TOKEN'))
  return false;
   }

public function displayConf()
{
 $this->_html .= '
 <div class="conf confirm">
  <img src="../img/admin/ok.gif" alt="'.$this->l('Confirmation').'" />
  '.$this->l('Settings updated').'
 </div>';
}
public function displayErrors()
{
 $nbErrors = sizeof($this->_postErrors);
 $this->_html .= '
 <div class="alert error">
  <h3>'.($nbErrors > 1 ? $this->l('There are') : $this->l('There is')).' '.$nbErrors.' '.($nbErrors > 1 ? $this->l('errors') : $this->l('error')).'</h3>
  <ol>';
 foreach ($this->_postErrors AS $error)
  $this->_html .= '<li>'.$error.'</li>';
 $this->_html .= '
  </ol>
 </div>';
}



   function hookAdminOrder($params) {
 $display = '

 <p> <label>ddd</label></p>
 <p ><img src="http://chart.apis.google.com/chart?cht=qr&chs=200x200&chl=[b][color=#ff0000]idcode[/color][/b]"/></p>';

 return $display;
   }
}
?>

Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...