This extension was built to connect your Printful store to your bagisto store using the official PHP-wrapper from Printful.
1. To install the extension for development please make sure you have Bagisto installed and have made a new directory in packages
called SamiXSous
.
3. Now that you have downloaded the Printful extension let’s install it by adding the following lines to {bagisto root}/config/app/php
file.
In the providers array add the following:
SamiXSous\Printful\Providers\PrintfulClientServiceProvider::class
And in the alias array add the following:
'Printful' => SamiXSous\Printful\Facades\Printful::class
Next we are going to go back to the {bagisto root} folder and run the following command:
composer require printful/php-api-sdk
Now we are going to add a line to the composer.json file. In the composer.json file search for psr-4 and add the following to this array:
"SamiXSous\\Printful\\": "packages/SamiXSous/Printful-Bagisto/src"
Next we are going to add seeding for the plugin. To do this we are going to add lines to the following file {bagisto root}/database/seeds/DatabaseSeeder.php
First we are going to add the following line outside the class:
use SamiXSous\Printful\Database\Seeders\DatabaseSeeder as PrintfulDatabaseSeeders;
After we will add the following in the run function:
$this->call(PrintfulDatabaseSeeders::class);
We will now run the migration with
php artisan migrate
To make sure our routes are working we are going to clear the route cache
php artisan route:cache
Last but not least we will run npm to produce the frontend files needed. Once in the {bagisto root}/packages/SamiXSous/ directory run the code:
npm run dev
Once these lines have been added and you ran the commands you should see a Printful tab in the admin section of your Bagisto store!🎉🥳🙌🏼
- UI
- Made connection with Printful API
- Make a landingpage to insert Printful API key
- Insert Printful products to Bagisto DB (Sync)
- Insert Pictures to bagisto
- Create Printful orders
- Handle Error Exceptions