Заголовок ответа Shopify REST Admin API не содержит URL-адрес следующей страницы результатов. ⇐ Php
Заголовок ответа Shopify REST Admin API не содержит URL-адрес следующей страницы результатов.
According to the official shopify documentation , "https://shopify.dev/docs/api/usage/pagi ... nated-data" there will be a link to the next page in the response header , but in my practical scenario , theres no link available , am i missing somthing ? there are almost 60 products in my store Thanks in advance.
$productEndpoint = "https://".$this->shop."/admin/api/2024-01/products.json"; $perPage = 20; // Set the desired number of products per page $allProducts = []; do { // Append query parameters for per_page and page $url = $productEndpoint."?limit=".$perPage; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'X-Shopify-Access-Token: ' . $this->accessToken, ]); $response = curl_exec($ch); $headers = curl_getinfo($ch); $productDataArray = json_decode($response, true); echo "All Headers:\n"; var_dump($headers); // Close the cURL connection curl_close($ch); } while (true);
Источник: https://stackoverflow.com/questions/780 ... -next-page
According to the official shopify documentation , "https://shopify.dev/docs/api/usage/pagi ... nated-data" there will be a link to the next page in the response header , but in my practical scenario , theres no link available , am i missing somthing ? there are almost 60 products in my store Thanks in advance.
$productEndpoint = "https://".$this->shop."/admin/api/2024-01/products.json"; $perPage = 20; // Set the desired number of products per page $allProducts = []; do { // Append query parameters for per_page and page $url = $productEndpoint."?limit=".$perPage; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'X-Shopify-Access-Token: ' . $this->accessToken, ]); $response = curl_exec($ch); $headers = curl_getinfo($ch); $productDataArray = json_decode($response, true); echo "All Headers:\n"; var_dump($headers); // Close the cURL connection curl_close($ch); } while (true);
Источник: https://stackoverflow.com/questions/780 ... -next-page
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Заголовок ответа Shopify REST Admin API не содержит URL-адрес следующей страницы результатов.
Anonymous » » в форуме Php - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Получите данные обо всех клиентах в магазине Shopify, используя API Shopify и PHP Laravel.
Anonymous » » в форуме Php - 0 Ответы
- 18 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Получите данные обо всех клиентах в магазине Shopify, используя API Shopify и PHP Laravel.
Anonymous » » в форуме Php - 0 Ответы
- 22 Просмотры
-
Последнее сообщение Anonymous
-
-
-
Как пройти аутентификацию для FCM Rest API с помощью Google REST API в PHP REST API?
Anonymous » » в форуме Php - 0 Ответы
- 155 Просмотры
-
Последнее сообщение Anonymous
-