Nomak Posted September 20, 2022 Share Posted September 20, 2022 Hi folks, for a client of mine, I am considering to build a solution to import Shopify producsts via Shopify API into the Processwire backend, creating pages for each product. This task should be repeated each 15 minutes or so via cronjob, to keep the product list up to date. Reading the Shopify API docs I found out that among the many Shopify APIs these two libraries could be the right ones: Shopify API Library for PHPhttps://github.com/Shopify/shopify-api-php PHP Shopify SDKhttps://github.com/phpclassic/php-shopify Is there anybody in the forum who has experience with those libraries, or who knows which one of the libraries is better to get the job done? Has anyone already build a Processwire module to do that? Link to comment Share on other sites More sharing options...
Gideon So Posted September 20, 2022 Share Posted September 20, 2022 Hi @Nomak I think you don't need to use these library to access the shopify api. Take a look at the following link: https://gist.github.com/calufa/c575b31291bb000fbf59 Gideon 2 Link to comment Share on other sites More sharing options...
kongondo Posted September 20, 2022 Share Posted September 20, 2022 Hi @Nomak. Welcome to the forums. 7 hours ago, Nomak said: I am considering to build a solution to import Shopify producsts via Shopify API into the Processwire backend, creating pages for each product. Is this a one-off? If yes, another option is to export the products (in the Products Dashboard in Shopify admin) as CSV and then use that to import the products into ProcessWire. At that point you can use the ProcessWire API + PHP to do the imports or modify the CSV and use a module such as ImportPagesCSV to import to ProcessWire. 2 Link to comment Share on other sites More sharing options...
Nomak Posted September 21, 2022 Author Share Posted September 21, 2022 @Gideon So Thanks for that input, I didn't know that the API can be accessed also by much simpler scripts withou using the library. @kongondo No, it's not one-off. The product import should be each 15 minutes or so via cronjob. I have edited my post to explain it better. 1 Link to comment Share on other sites More sharing options...
kongondo Posted September 21, 2022 Share Posted September 21, 2022 10 hours ago, Nomak said: The product import should be each 15 minutes or so via cronjob. I have edited my post to explain it better. I see. In that case, you need to be aware of Shopify API rate limits (if you are not already ?). Link to comment Share on other sites More sharing options...
Pixrael Posted September 21, 2022 Share Posted September 21, 2022 or.. you can use the Shopify Webhooks subscriptions too. For REST AI check here: https://shopify.dev/api/admin-rest/2022-07/resources/webhook Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now