This is great and returns an object, but my problem is when I come to calling the method getInventory its not available. Looking into getProduct in VendAPI, it doesn't create a new VendProduct Object if a result is found. If I change this method to create a new VendProduct eg.
return is_array($result) && isset($result[0]) ? new VendProduct(null, $result[0]) : new VendProduct(null, $this);
This exposes the method but then Im having issues with iterating through the vendObjectProperties to find the inventory key now.
I would really appreciate it if you could tell me where I may be going wrong.
Hey,
Your class has been a great starting point...
Were running PHP 5.2.9 so it needed the name spaces removing, but I just wanted to check that the issue I am having is related to this somehow :)
As per your docs Im trying to update a products inventory, but first I just want to get count.
This is great and returns an object, but my problem is when I come to calling the method
getInventory
its not available. Looking intogetProduct
in VendAPI, it doesn't create a new VendProduct Object if a result is found. If I change this method to create a new VendProduct eg.This exposes the method but then Im having issues with iterating through the vendObjectProperties to find the inventory key now.
I would really appreciate it if you could tell me where I may be going wrong.
Cheers,