AbanteCart Development > Customization help

Getting MySql Error (v1.2.13)

<< < (2/2)

rigrax:
I wrote earlier: based on syntax found in storefront/model/checkout/order.php    (line 152), assuming Abantecart's own code would be the right format....
Is the rest of the code I wrote correct?
What are the steps I must take, after getting the data I want, to insert the data into a DIFFERENT database on the same server?
Thanks for the feedback abolado

abolabo:
i mean you write incorrect.
Try this

$sql = "SELECT MAX(order_id) AS order_id FROM `".$this->db->table("orders")."`";
$result = $this->db->query($sql);

$max_order_id = $result->row['order_id'];

rigrax:
Thanks; I see what you  meant now....  I'll try this when I get back to the office.

rigrax:
After correcting the amysqli.php error remains, but the order IS going through (I am receiving the confirmation emails in admin and to user).
This happens when placing the code on the tpl page, and as noted, this isn't where it should go.....

But I think it's redundant to add this sql to the order.php model, since code is already there to return some of the data I want.

It seems logical to me that I should be able to insert a hook on the success.tpl page to bring the data there.
If this is correct, what should the syntax for that be?

Thanks for the aid!

Navigation

[0] Message Index

[*] Previous page

Go to full version
Powered by SMFPacks Social Login Mod