Creating a custom theme for Bagisto had been a hot topic lately. More and more users are actively trying our framework and we’re genuinely overwhelmed by it.
Coming on how to create a custom theme for Bagisto. It’s super easy!!!. With just a few lines of configuration code. Similarly following the traditional way of creating view files in Laravel would be enough.
Please follow the below steps on how to create a custom theme in Bagisto.
themes.php file inside the config directory of Bagisto’s root.
Contents of themes.php file having information of currently active theme named default.
Let’s go through the parameters of this theme’s file. Because the understanding of those parameters will help you in creating a custom theme.
Default parameter showing your currently active theme.
Bagisto’s default theme parameters.
parent parameter allows you to use previously existing theme files.
4. Now we need to create a view file for our theme, the location of view file is according to the path given to views_path variable.
While creating view files, be careful about the directory structure. The directory structure of the shop package’s view file & your themes view file should be same.
5. Now we need to create an asset file for our theme & we will do it as same as we did for creating the view.
6. Now you need to select a default theme for your channel and you can do it while editing channel.
Finally, define your own paths and name of your custom theme inside ‘themes.php’ file. And start creating view files. Do not forget to cover all get routes of shop package having a parameter called ‘view’.
All storefront routes are inside this file.
Make sure the name of the blade file should be same as passed in this GET route file like this:
For all views check all GET routes as they hold a view parameter with the value of view to be used.
Note:- We use vue component in our package, if you are using our component then you have to add our js file in your theme’s master layout.
Like – <script type=”text/javascript”
src=”{{ asset(‘themes/default/assets/js/shop.js’) }}”></script>
We will consistently update this blog post, so don’t forget to keep a check on it regularly.
Video Tutorial:-
That’s all for today’s tutorial on theme development. If you are looking for a more customised solution, you can easily hire laravel developers for your tailored projects on laravel.
If you have more details or questions, you can reply to the received confirmation email.
Back to Home
Greetings for the day!!! Of course, we can provide you with the demo. We will soon release a video tutorial too for that. If you have any further query regarding implementing theme, you can always raise a ticket at bagisto.uvdesk.com
Greetings for the day!!
Yes, we release video for the same please check the below link.
https://youtu.be/Jx6K-GQ0E4k
Making a full video about how to customize the themes and add the files in the right directories would be very helpful.
Greetings for the day!!!
Thank you for your suggestion. We will do come up with video regarding customizing theme in bagisto soon.
Greetings for the day!!!
Could you please clarify more on your query? However just for information purpose on “views”, the view is used as a variable to return view from the respected controller as in here: https://github.com/bagisto/bagisto/blob/master/packages/Webkul/Shop/src/Http/routes.php
Are you getting any issues here? If yes, you can put the query on our forum so the dev can see to it and assist you: https://forums.bagisto.com/
I am new Bagisto user. I wish you good luck and perseverance. I will probably have many more questions.
Thanks for your feedback and on your issue, we will check on this. I will request you to check this once too for creating a theme: https://devdocs.bagisto.com/1.x/themes/ Please let us know if you have any further query.
Something like use a custom config to display the “page” chosen by the store owner:
Jewellery will be displayed in the common page
Bikinis will have a different page with videos (Category and product page)
Please post your query here https://forums.bagisto.com/ our developer will guide you on the same.
Regards
Greetings for the day!!
Can you share the screenshot of the issue? So we can check and rectify it.
Please once put the query on our forum so the dev can see to it and assist you: https://forums.bagisto.com/
Kindly post this query once on our forum so our dev can look into it: https://forums.bagisto.com/
Please once put the query on our forum so the dev can see to it and assist you: https://forums.bagisto.com/
I ran the following commands and my custom theme became visible in the themes dropdown:
php artisan cache:clear
php artisan config:clear