Shopify API Update Products Based on Conditions

If you already have a private app setup in a rails environment, skip the first step and go into your rails console.

If you don’t have a rails environment but you’re running on a mac or linux environment, you may already have ruby installed and all you have to do is install the shopify_api gem and enter into the shopify console environment with the following:

Once you fill in the answers to the questions for credentials you can run

Now that we’re in the same environment, we can instantiate our session and add our ShopifyAPI module and find and update our products

That’s it! Now you can use the variable to update any product field you desire.

Start your shop on shopify today! (My referral link)


David Chun

I'm a full stack developer that builds tools for marketing and managing ecommerce shops. I occasionally consult for startups. If you've got an interesting project, reach out.


Leave a Reply

Your email address will not be published. Required fields are marked *