Statamic Butik Docs
"Butik" is a Scandinavian term for a small to medium sized shop, precisely what this Statamic addon has been crafted for. The Statamic Butik e-commerce solution will integrate nicely with your personal Statamic site and help to grow your online business.
Statamic Butik Documentation
"Butik" is an addon for Statamic v3, which is in beta right now. Until Statamic v3 is in beta, you should be careful to use Butik in production. There can be breaking changes!
With the installation script
- You can install the package via composer:
composer require jonassiewertsen/statamic-butik
- Run the install command
php please butik:install
Will follow soon
General set up
Most of the steps have been taken care of by the installer. Those are the last modifications needed.
Open the statamic-butik.php config file
Add your Shop name, the address, mail, phone etc.
Specifying your country does automatically set the country your customers can ship your products to.
Insert your mail, where you want to receive order confirmations.
Those are optional.
Your mails will contain a useful links section at the buttom. Only if you want to. This could be a good spot to give your customer more information about your products, more shipping information, refund information etc ...
Define your shop currency
Do you want to rename the routes used by Statamic Butik? Feel free to change them here.
To integrate your shop perfectly into your existing site, you can swap the layout used by Statamic Butik.
Let's say you want to swap the layout for the product overview with your own layout file inside
// before 'layout_product-overview' => 'butik::web.layouts.shop', // after 'layout_product-overview' => 'layouts.my-layout',
butik:: prefix will ask Statamic, to look into the vendor files. If wanted, you can make some changes to the existing files inside
If you want to use your own files, reduce the prefix to start inside the resources/views directory.
They are precisely working as layouts.
Don't make any changes to the payments inside the config file. Do so in your .env file
Your .env file should mostly be set up. To make sure you got it right, here comes an overview
# Remember to set your APP_ENV to something different then local, to work with webhooks. # SQLite setup DB_CONNECTION=sqlite DB_FOREIGN_KEYS=true # Remember to set up your mollie key MOLLIE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # In case you want to use redis for your queues # remember to require predis/predis via composer QUEUE_DRIVER=redis # Get your email set up. Test it via the Statamic control panel MAIL_DRIVER=smtp MAIL_HOST=your.host.com MAIL_PORT=XXX MAIL_USERNAME=your_username MAIL_PASSWORD=your_password
To add another language open the lang directory
Make a copy of the en folder, rename it into your prefered language and change the translations in your newly created folder.
// before 'back' => 'back', // for german translation 'back' => 'zurück'
Make sure NOT to delete the
en directory. It is the fallback language and should not be deleted.
Version controll your Database?
No Problem with SQLite!
Go into your
database directory and delete the .gitignore file in there. That's it. Git will track those changes now.