Skip to content

CGSmith-LLC/netps-woocommerce-importer

Repository files navigation

WooCommerce and NetPS Plant Finder Sync

This will synchronize WooCommerce data with NetPS Plant Finder data. The script requires a few things to operate and is intended to run on initial item setup. It can run multiple times though because it only looks for uncategorized products in WooCommerce.

Prerequisites

I'm not going to explain installs of PHP, Composer, or Net PS download. This should be easily found online if you are this far.

Setup

  1. You will need to copy the .env.example file to .env and fill out your information as required.
  2. Run composer install to get all required vendor scripts
  3. You should have Google's credentials.json placed in the root folder
  4. Place netps.csv data in the root folder
  5. Run php index.php and follow any prompts for Google or keys

What happens?

This script performs the following in order:

  1. Find all categories in WooCommerce
  2. Find the category that matches uncategorized in WooCommerce
  3. Find all products that are published in the uncategorized category
  4. Loop through products and lookup SKU in Google Sheet to find NetPS #
    1. Stores NetPS ID and Product ID
  5. Get NetPS data
  6. Fetch NetPS category, description, photo that matches WooCommerce Product
  7. Create WooCommerce category if needed.
  8. Update product and categories
  9. Generate report of what changed

Credits

Chris Smith - @cgsmith105

About

A way to import NetPS Plant Finder data into WooCommerce

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published