Seem to get empty data

billyjones26's Avatar

billyjones26

26 Nov, 2012 10:54 AM

Hi,

I'm using the PHP CodeIgniter wrapper. I've double checked my username and password and I'm just trying a simple get customer. I get this response

$this->load->library('cheddargetter/cheddargetter.php');
var_dump($customer = $this->cheddargetter->getCustomer(1));

object(CheddarGetter_Response)#26 (2) { ["_responseType:private"]=> string(9) "customers" ["_array:private"]=> NULL }

When I enter the wrong ID I get a message telling me that the Customer not found. So it's like it's finding the customer but it's not passing the data back?

I'm still in a developer account, haven't upgraded to a paid CG account.

Anyone used the CI wrapper had seen this?

  1. Support Staff 1 Posted by Marc Guyer on 26 Nov, 2012 02:54 PM

    Marc Guyer's Avatar

    Hi Billy -- Your var_dump is correct. The value of $customer is a CheddarGetter_Response object which is a DOMDocument object. You can take a look at the raw content by simply printing it:

    $this->load->library('cheddargetter/cheddargetter.php');
    $customer = $this->cheddargetter->getCustomer(1);
    echo $customer;
    

    Or, get the array:

    var_dump($customer->toArray());
    
  2. 2 Posted by billyjones26 on 26 Nov, 2012 03:43 PM

    billyjones26's Avatar

    Stupid me, thanks Marc!

  3. adam closed this discussion on 26 Nov, 2012 04:28 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac