-
Notifications
You must be signed in to change notification settings - Fork 1
Batch Upload
Instructions on how to batch upload to the store.
- zip images on dropbox - will need time to sync with dropbox 1hr or more
- Finalise spreadsheet
- SSH to app server
- on the app server prepare a temp folder for uploading
- wget the zip of images
- unzip the file
- wget the spreadsheet
- backup the db
- run the spreadsheet import rake task
- have a quick look in spree to see it was imported ok
- run image import scripts: styleit, moodboard, customizations, songs, perfume, product photos
- have a quick look in spree to see it was imported ok
- when the product looks good, set the available date for yesterday
- reindex and refresh cache
SSH to the db server
sudo -i eybackup -e postgresql -n
ey ssh 'sudo -i eybackup -e postgresql -n' -e production_new --database_master
Use terminal screen util to maintain sessions on server.
To create temp content folder
mkdir contentuploads
- cd into
- wget spreadsheet
- wget images zip
- unzip images zip into a new folder
To run rake tasks
cd /data/fame_and_partners/current
FILE_PATH= the location of the spreadsheet on the app server.
LOCATION= the location of the images folder on the app server.
Spreadsheet
bundle exec rake import:data FILE_PATH=
Images: Accessories
bundle exec rake import:accessory:images LOCATION=
Images: Customisations
bundle exec rake import:customization:images LOCATION=
Images: Moodboards
bundle exec rake import:moodboard:images LOCATION=
Images: Perfume
bundle exec rake import:perfume:images LOCATION=
Images: Products
bundle exec rake import:product:images LOCATION=
Images: Songs
bundle exec rake import:song:images LOCATION=
There is a button to refresh cache in spree admin https://www.evernote.com/shard/s109/sh/2790a893-77b3-4b9b-aee6-b53534578113/46980f2d85ff9e0d00914ecbba372e70
The file should look like this to work:
- First column contains SKU
- Second contains price ONLY for new products
- File has no empty lines