Jump to content

How to update order invoice date


cikcak

Recommended Posts

I would like to change order date like add note.

 admin/themes/orders/_document.tpl --

<form method="POST">
        <tr><td>Invoice:</td>
<td><input type="text" name="invoice_number" value="{$order->invoice_number}"/></td>
<td><input type="submit" value="Change" name="submitSPO"/></td>
    </form>

controllers/admin/AdminOrdersController.php

elseif (Tools::isSubmit('submitSPO'))
        {
        $spo = Tools::getValue('in');
     

            $db = Db::getInstance();
            $values = array( 'invoice_number' => $spo);    
            $result = $db->autoExecute(_DB_PREFIX_.'orders', $values, 'UPDATE', 'id_order = '.$order->id );
            
        }

Where is my mistake? i still can`t change it.. I need to change cuz some orders is not from shop, some from shop..

Link to comment
Share on other sites

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...