OctoberCMS Printful API Wrapper for OFFLINE.Mall
This plugin adds Printful Sync capabilities to the OFFLINE.Mall plugin.
It adds a new tab in the product backend called "Printful". There, you can pick your product and specify your print files. Once saved, each variant you have in your product will generate items to pick for each variant (Printful Variant, Print File, Option ID, and Option Value). customize these to your needs.
Getting started
To use this plugin, you'll need the following:
- OctoberCMS 2.0.*
- Set up your queue workers in your application. You can learn how to do that via OctoberCMS Documentation.
- Specify the
PRINTFUL_API_KEY
found in your store in the.env
file of your application. - Specify if you would like to confirm the orders as soon as they are made under
PRINTFUL_CONFIRM_ORDERS
(boolean | 1 = true, 0 = false) - Sspecify your currency code under
PRINTFUL_CURRENCY_CODE
-
Specify if you want to sync your products on save
PRINTFUL_SYNC_ON_SAVE
(boolean | 1 = true, 0 = false)Env examples below:
PRINTFUL_API_KEY=someapiKey # Confirm orders immediately in Printful (1 for yes, 0 for no. Defaults to 0) PRINTFUL_CONFIRM_ORDERS=0 # Currency code, should be the one you set in the OFFLINE.mall backend. PRINTFUL_CURRENCY_CODE=USD # Sync Products on save to Printful. (1 for yes, 0 for no. Defaults to 1) PRINTFUL_SYNC_ON_SAVE=1
To sync products to your store, run the command php aritsan printful:sync
in your application's directory via command line. The products sync on save in the background if the queue workers are setup.
Sync on save
This option will sync ALL products in your system on save. Only useful if you have already run the command php artisan printful:sync
. If you would like to change this, Please submit a pull request via GitHub
Other Notes
This is a one way sync to Printful. It only syncs variants if the variant is selected in the backend and creates orders on the fly. If you would like to contribute to the code, I'd love the help! Please submit a pull request via GitHub
Tips
For getting the print files the right size, head over to the Mockup Generator in Printful. Upload your design, and adjust as needed. Once done, you can export out the mockups and the print files associated with the mockups.
-
This plugin has not been reviewed yet.
-
1.1.18 |
fixed a bug where the sync command would time out if a new product was being synced May 29, 2021 |
---|---|
1.1.17 |
Added MIT License May 25, 2021 |
1.1.16 |
Fix issue where plugin wouldn't refresh on remove correctly. May 25, 2021 |
1.1.15 |
Fix bug where wrong items would be displayed in variant optons May 24, 2021 |
1.1.14 |
Removed remnant code May 23, 2021 |
1.1.13 |
added validation messages that make more sense May 23, 2021 |
1.1.12 |
Update print placement fields to automatically remove based on selection May 21, 2021 |
1.1.11 |
Changed command to a more simple name. May 18, 2021 |
1.1.10 |
Only push orders to printful if checkout is successful and ENV check is is set May 18, 2021 |
1.1.9 |
add sync commands in the queue May 16, 2021 |
1.1.8 |
sync all products with command May 16, 2021 |
1.1.7 |
Rate limit fix for syncing products May 16, 2021 |
1.1.6 |
specify file types you can upload under the global files option May 15, 2021 |
1.1.5 |
version bump May 10, 2021 |
1.1.4 |
code fixes and cleanup May 10, 2021 |
1.1.3 |
bugfixes, added sync on save May 10, 2021 |
1.1.2 |
revert fix because it wasn't needed May 10, 2021 |
1.1.1 |
fix sync issue May 10, 2021 |
1.1.0 |
fix erronous code May 09, 2021 |
1.0.9 |
fix variant issue May 09, 2021 |
1.0.8 |
Added external ids to variants when synced May 09, 2021 |
1.0.7 |
remove remnant code May 09, 2021 |
1.0.6 |
fix version types May 09, 2021 |
1.0.5 |
Fix bug where mutiple types of files were being assinged incorrectly May 09, 2021 |
1.0.4 |
Added print placement to variants May 09, 2021 |
1.0.3 |
Version bump May 05, 2021 |
1.0.2 |
Created PrintfulAPI Models May 05, 2021 |
1.0.1 |
First version of PrintfulAPI May 05, 2021 |