Giter Site home page Giter Site logo

danielrob / prepare-shopify-product-upload Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 2.0 242 KB

Prepare import csv's to upload shopify products with associated photos directly from your file system using ngrok.

License: MIT License

JavaScript 100.00%

prepare-shopify-product-upload's Introduction

Shopify Product Upload

Prepare import csv's to upload shopify products with associated photos directly from your file system using ngrok.

Explanation

Shopify does everything it can to confuse the fact that the file manager has practically nothing to do with product photos.

In truth the image urls in the import csv's just need to exist on a server somewhere, and are used once each during the import for Shopify to grab a copy of copy them. That server might as well be your own filesystem, which is easily done using ngrok and e.g. http-server.

Additionally, it is often useful to map a merchant-specific product specification spreadsheet to shopify's one, even if it's just renaming columns. This project allows that - see customisation below.

Usage

  1. Clone or download this project
  2. You must have node installed.
  3. Using the command line, change directory into your cloned or downloaded folder e.g. $ cd shopify-product-upload
  4. Run $ npm install
  5. Open, edit, and save the assets/products.xlsx file - add your products.
  6. Add your product images, grouped by SKU into the assets/images folder. To specify alt text for each, add a .txt file with the same name as the image in the same folders.
  7. Run npm run start and keep this process running.
  8. Navigate to https://<your-store>.myshopify.com/admin/products and click import. Select the generated csv file (e.g. import.csv) in the output folder for import, and click import. Wait.
  9. All your products will be uploaded. When done you can stop the process by typing ctrl-c.

Customisation

In order to customise the behaviour you need to be able to code with javascript. Feel free to contact me at [email protected] if you want me to help you out.

In the generateCSV function in the product-upload.js file you'll see a bunch of column names (which you/the client/merchant will use) and that these are reduced to a bunch of shopify column names (that Shopify will use). Wherever it's appropriate, transform functions are/may be written to simplify the products.xlsx format.

Modes

CSV generation debugging / development.

By default running $ npm run start starts an ngrok server for you. If you're mainly developing/debugging the csv generation you can create a .env file as per the .env.sample file and fill in the NGROK_PREFIX field. The field value can be garbage until you actually want to use the output file for upload i.e. during customisation.

Generate a csv for updating products without re-uploading images.

Add an .env file as per the .env.sample and set SKIP_IMAGE_UPLOAD to true.

Generate a csv to update only some products

Add an .env file as per the .env.sample and set SKUS_TO_INCLUDE to a comma seperated list of SKU codes for your products.

FAQs

Metafields?

No support yet, but a hack method to embed data in the product description using html comments is included. Shopify help line said why not!

prepare-shopify-product-upload's People

Contributors

danielrob avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.