IM Hikashop integration - Invoice number

arnask
arnask
Offline
0
Hikashop integration plugin takes data about order and based on this data Invoice Manager creates invoice. That is working fine on my site. But the problem is that Hikashop creates his own invoice number and displays it in Customers orders listing in frontend.

How to set correct invoice number (from IM) in Hikashop orders listing?

i'm not good in php, but i think it should be smth like this:
"UPDATE #__hikashop_order SET order_invoice_number='$invoice_num' WHERE ....;

please help with this

Accepted Answer

arnask
arnask
Offline
Thursday, September 19 2019, 08:21 AM - #Permalink
0
i've done it. just 4 lines of code in plugin after line 190:
$query=" UPDATE #__hikashop_order SET order_invoice_number='$invoice_num' where order_id = ".$order->order_id;
$db->setQuery($query);
$results = $db->loadRow();
$db->execute();
The reply is currently minimized Show
Responses (2)
  • Accepted Answer

    Thursday, September 19 2019, 07:03 AM - #Permalink
    0
    Hi

    a way to do it could be this (modify the plugin so it updates the hikashop order)

    but also in Invoice Manager, the original order number is imported as the token {external_ref}

    you can use this in the template.
    The reply is currently minimized Show
  • Accepted Answer

    arnask
    arnask
    Offline
    Thursday, September 19 2019, 08:34 AM - #Permalink
    0
    i also have file update.php which updates all previous orders with correct invoice number from IM
    The reply is currently minimized Show
Your Reply