Tom S. Posted September 13, 2015 Share Posted September 13, 2015 In IPB3 I could collect all the customer's data using the following code$info = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'nexus_customers', 'where' => "member_id={$memID}" ) );This created a very neat array with all the customers data. For example:$info['cm_first_name'] info['cm_address_1']; I do not know how I can replicate something similar in IPS4.I am guessing it will be something along the lines of\IPS\Db:: etc...Does anyone know how this can be done?Much appreciated. Link to comment Share on other sites More sharing options...
Stuart Silvester Posted September 13, 2015 Share Posted September 13, 2015 You can access the customer object directly.<?php ... $customer = \IPS\nexus\Customer::load( $memberId ); /* Full Name */ $customerName = $customer->cm_name; Link to comment Share on other sites More sharing options...
Tom S. Posted September 13, 2015 Author Share Posted September 13, 2015 You can access the customer object directly.<?php ... $customer = \IPS\nexus\Customer::load( $memberId ); /* Full Name */ $customerName = $customer->cm_name; Thanks, but I don't see billing information amongst the list of available variables. (unless I missed it).I only see [cm_first_name] => [cm_last_name] => [cm_phone] => [cm_profiles]To get billing info do I have to use a different command? Or is supposed to be in that list? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.