Jump to content

Converting a PW site from Snipcart to Shopify


Ivo
 Share

Recommended Posts

Hi Folks,

This PW site https://ancientlakesmagnesium.com.au/ currently runs Snipcart. Products are built in PW pages but the cart and checkout is managed by Snipcart. Snipcart adds new products to its inventory when first added to the cart, thus a copy of the product catalog is on the Snipcart account. My Client manages all the sales/transactions on Snipcart. The problem is Snipcart is limited, my client wishes to connect to smile.io which is much cheaper to do with a pre-built Shopify app and to have PayPal Subscriptions. Snipcart is showing to be limited in several things now that their business has grown.  

 

My question is, has anyone had success plugging in products from PW pages into Shopify via the Shopify API? I spoke to Shopify support and they pointed me to the one post in this forum, but it doesn't give any detailed instructions and it quite old now. My other option is to build a Shopify system as a sub domain and somehow build an app that mirrors the menu structure on the PW site so that the user doesn't have to maintain 2 menus. 

 

If anyone has any suggestions that would be most appreciated.

 

cheers,

Ivo

Link to comment
Share on other sites

I have done this (product migration from A to Shopify) and it is fairly simple using Shopify's API and a Shopify private app.  I have used this library . Probably what is more time consuming is understanding Shopify's API endpoints. (e.g. took me some time to understand all shopify product objects actually have at least one variant object, where the actual price is kept!)

My doubt is, do you plan to completely deprecate the PW website? Or do you plan to embed Shopify somehow into the existing site? 

  • Like 2
Link to comment
Share on other sites

Thank you elabx for your response. The plan is to keep PW. I would like Shopify to manage the user accounts and transactions (so the cart is Shopify). Was hoping to keep the products as they are , in PW pages (thus they template/styles are all PW and I don't have to manage 2 templates). Have you got a link to the example that you did? Many thanks.

Link to comment
Share on other sites

Heres a VERY rough script and it's very messy. (ran it from command line also)

https://gist.github.com/elabx/ba4879fe36ca9430f8d614aaee52fc5a

Specifically, check the functions addProduct() and updateProductVariant(), in those two functions is where I call the Shopify client, and all the setup starts here on line 175. This script is meant to grab data from a CSV, by if you look at addProduct you can basically tell how to add a product through the API so instead passing an array to that function you could pass a Page object for example and fill in the gaps. 

On shopify you would just need to setup a Private application, to get the required key/secret.

BEWARE to run the script as is, because it deletes all products on the Shopify store every time the script runs. 

 

 

  • Like 2
Link to comment
Share on other sites

16 hours ago, Ivo said:

Thank you elabx for your response. The plan is to keep PW. I would like Shopify to manage the user accounts and transactions (so the cart is Shopify). Was hoping to keep the products as they are , in PW pages (thus they template/styles are all PW and I don't have to manage 2 templates). Have you got a link to the example that you did? Many thanks.

So do you plan on using the frontend Shopify javascript libraries to display the products/enable cart? Or how do you plan to integrate that? I know I'm a bit out off topic haha but maybe it's something we can help you with, too. 

Link to comment
Share on other sites

8 hours ago, elabx said:

So do you plan on using the frontend Shopify javascript libraries to display the products/enable cart? Or how do you plan to integrate that? I know I'm a bit out off topic haha but maybe it's something we can help you with, too. 

Thank you for the script. That will be very helpful to give me perspective. I have a lot to think about. Since smile.io is the main app my client wants to use, I need to see how that operates within in product page, ie is it tracking user actions on the page or not, then decide which method is best. The frontend Shopify js libraries sound good, I did intend to use it for the cart, but not sure how that would go for SEO for the products.

Thanks again elabx.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...