joshrps / laravel-shopify-API-wrapper

Interface designed for Shopify apps created with Laravel
MIT License
93 stars 48 forks source link

Cursor Based Pagination #39

Open makebecoolyeh opened 4 years ago

makebecoolyeh commented 4 years ago

DeepinScrot-5519

Hi. Cursor based pagination is not working , please check screen and if you can help me)

kabooie commented 4 years ago

Hi @makebecoolyeh Not sure if this is still an issue for yourself or anyone else but I encountered the same issue today and got around this by changing line 297 in /src/RocketCode/Shopify/API.php to the following

$header_components = explode(':', $header);
$key = array_shift($header_components);
$val = join(':', $header_components);

In my case, it managed to resolve the situation by joining all the values originally omitted during the explode and assign process into a string and assigning this to the $val variable. This meant that when the explode is called the link value which includes the : character would remain intact. It may be temporary or have some knock-on effects that I am unaware of at the moment but hope this helps either yourself or anyone else :) If you have any questions let me know and I will help where I can.