Closed phena109 closed 5 years ago
This will be added in the next release
Just an update.
For some reason I have cleaned up my vendor folder and redownload everything as well as the cache folder the library created. I then keep getting exception You must define a type for Slince\Shopify\Manager\Order\Order::$customer.
when I use the library.
After extensive check, I realised that no exception was thrown was just because I have been naughty and changed some of the config file. But as I load up everything from scratch, I get the issue. Later I found out what I have changed is the YAML file at slince/shopify-api-php/config/serializer/Manager.Order.Order.yml
. All I need is to append the following and the customer property and customer property will at least show up as plain array with the right information.
customer:
type: array
This is just a quick info for you to put in the code so you can at least avoid some unwanted exceptions as well as sort of serve the customer content in the order object.
Hope this help, D
fixed; you can access customer $order->getCustomer();
// instance of Slince\Shopify\Manager\Customer\Customer
I have used the
OrderManager
to get an order and in the API doc it says we will have the customer property but there is no function calledgetCustomer
in theOrder
model I retrieved.In the end I have fallback to use the basic CRUD to get the order detail again and extract the customer information.
Can you please add the customer bit in? Thanks so much D.