Hi,
I have searched for hours for help on this, I want to get the total of logged in users spend so I can allocate a coupon amount based on total.
for example, when logged in the information is available on the /order-history page , but I want to access the object from the login page /log-in
I will be placing the code in html/com_vm/user/login3.php file
I want to assign the total amount to a var within the log-in page
I need a line of code similar to $orderModel = VmModel::getModel('orders');
Thanks for reading,
Phil
Using VM 3.2 12
Joomla 3.9 11
Hello,
eventually (after 4 days searching) found the answer in the view.html file within vm/views/user folder
I placed the code in the login file, so I'm able to access logged in users history etc
see below, might save someone heartache
// Check for existing orders for this user
$orders = VmModel::getModel('orders');
$orderList = $orders->getOrdersList($userDetails);
in the new core is a function for order count, it is quite easy to rewrite it for the totals.