This extension was built to connect your Printful store to your bagisto store using the official PHP-wrapper from Printful.
packages
called SamiXSous
.{bagisto root}/packages/SamiXSous/
directory you may clone this repository.{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