Example #1
0
 /**
  * Find a product by it's name.
  * The name has to be an exact match in
  * order to get any returns. Unfortunately
  * this method can't be used very well as a
  * search function.
  *
  * @param  string $query
  * @return null|stdClass
  */
 public function find($query)
 {
     $handles = $this->client->Product_FindByName(array('name' => $query))->Product_FindByNameResult;
     if (!isset($handles->ProductHandle)) {
         return null;
     }
     return $this->getArrayFromHandles($handles->ProductHandle);
 }