You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@kish2011
You can use the url() and links() methods of the Collection object to access URLs and links.
For details see: \Swell\Resource::url(), \Swell\Resource::links()
@kish2011 $products is collection of products. It is iterable object. You can just do foreach, without ->records(). *(1)
\Swell\Resource::url(), \Swell\Resource::links() are system information, it is not about products detail. If you would like work with product information you have to use your method or method *(1)
I am using this PHP lib to access the products. But all data are protected.
Swell\Collection Object
(
[count] => 2
[pages] =>
[page] => 1
[url:protected] => /products
[links:protected] => Array
(
[variants] => Array
(
[url] => /products:variants?parent_id={id}
)
How do I access it? I am using this. Object is protected.
$swell = new \Swell\Client('store-id', 'secret-key');
$products = $swell->get('/products', [
'search' => 'press'
]);
The text was updated successfully, but these errors were encountered: