Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    How can I change theme and write own html for front-end section not the admin panel?

    Modules
    8
    19
    5210
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Rafin last edited by

      What is the better approach to modify front-end theme without disturbing the core?

      A 1 Reply Last reply Reply Quote 0
      • N
        Naresh-webkul last edited by

        Hi
        Raffin, You have to change the default theme to your Custom theme by adding the view_path and assets_path and name in your themes.php file in the config folder .
        configfolder.png

        Then next step is to add all yours view files and assets file to that view_path and assets_path .
        assets_path.png
        Next you just have to create the folders and file in that path .
        view_path.png

        Thanks.

        1 Reply Last reply Reply Quote 0
        • N
          Naresh-webkul last edited by

          One more thing you have to set the theme from your admin pannel .
          goto->settings->channels->Design
          customchannel.png

          1 Reply Last reply Reply Quote 0
          • R
            Rafin last edited by

            Is this necessary to change the theme in admin panel as well? Cause i don't want to change anything for admin dashboard.

            1 Reply Last reply Reply Quote 0
            • R
              Rafin last edited by

              Hello! Are you interested in replying my queries?

              1 Reply Last reply Reply Quote 0
              • N
                Naresh-webkul last edited by

                Hi
                Rafin, we apologise for any inconvenience caused by the late replying your queries .it was due to the three days off.

                And Yes,You are understanding it wrong ..by changing theme in admin panel it doesn't mean it will change theme for the admin ... it will change only for the show front.
                And you have to select the custom theme from the drop down to apply it on customer show front .
                And if you want to set your theme as default theme then just replace the default field with your new one custom field in the theme.php file
                thanks

                Y 2 Replies Last reply Reply Quote 0
                • Y
                  yaser-az @Naresh-webkul last edited by

                  @Naresh-webkul hello Naresh
                  I'm working on the dashboard design theme, I already have a custom theme I purchased from themeforest and want to apply one of the demos templates on my store dashboard.
                  To do so I placed some of the view blade files in the directory /resources/views/vendor/admin/ and inside it I created folders for dashboard and layouts, every things looks good.
                  My question is where I need to put my scss files ? in any directory ? and how to compile theme ? and where should the compiled css version been placed ?
                  Same question for js and images files .
                  Thank you .

                  1 Reply Last reply Reply Quote 0
                  • Y
                    yaser-az @Naresh-webkul last edited by

                    @Naresh-webkul Any suggestions ?

                    1 Reply Last reply Reply Quote 0
                    • N
                      Naresh-webkul last edited by

                      Hi,
                      @yaser-az .Sorry for late replying your query ,.

                      First of all You don't need to compile theme .just write that path(i.e asset_path and view_path ) in you config/theme.php file and apply it from the admin pannel .
                      And you can create scss file by creating your own package.if you don't know how create own package, then you should go with this following link:
                      https://bagisto.com/en/step-by-step-guide-for-bagisto-module-development/

                      and If you will open your project then you will find a file named webpack.mix.js in your module like -in the admin folder. You just need to copy the content of that file .and paste it into your package-> webpack.mix.js file.Also
                      in there you will find how js,image,and css are compiling .

                      you just need to run the follwing command on from terminal :
                      php artisan vendor:publish and press 0.
                      this will publish all your js,css and other file on to that path..

                      thank you .

                      Y 1 Reply Last reply Reply Quote 0
                      • Y
                        yaser-az @Naresh-webkul last edited by yaser-az

                        @Naresh-webkul Thanks for replay.
                        However, when I try to create a module after following the steps in the link you provided, I get that the provider class not found error after artisan serve :

                        Class 'packageACME\HelloWorld\Providers\HelloWorldServiceProvider' not found 
                        

                        In composer.json file in my projects root directory, I added this line for the ps-4 autoload :

                        "psr-4": {
                                    ..
                                    "ACME\\HelloWorld\\": "packages/ACME/HelloWorld/src",
                                    ..
                                }
                        

                        HelloWorldServiceProvider.php

                        <?php
                        
                        namespace ACME\HelloWorld\Providers;
                        
                        use Illuminate\Support\ServiceProvider;
                        
                        /**
                         * HelloWorld service provider
                         *
                         * @author    Jane Doe <janedoe@gmail.com>
                         * @copyright 2018 Webkul Software Pvt Ltd (http://www.webkul.com)
                         */
                        class HelloWorldServiceProvider extends ServiceProvider
                        {
                            /**
                             * Bootstrap services.
                             *
                             * @return void
                             */
                            public function boot()
                            {
                                include __DIR__ . '/../Http/routes.php';
                        
                                $this->loadViewsFrom(__DIR__ . '/../Resources/views', 'helloworld');
                                $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'helloworld');
                            }
                        
                            /**
                             * Register services.
                             *
                             * @return void
                             */
                            public function register()
                            {
                            }
                        }
                        
                        

                        the providers in config/app.php:

                        Screenshot from 2019-04-27 01-32-50.png

                        routes.php :
                        Screenshot from 2019-04-27 01-34-49.png

                        The new package directory :
                        Screenshot from 2019-04-27 01-36-06.png

                        Any suggestions ?

                        1 Reply Last reply Reply Quote 0
                        • P
                          prateek-webkul last edited by

                          Hello @yaser-az screenshot-from-2019-04-27-01-32-50.png
                          change the packageACME\HelloWorld\Providers\HelloWorldServiceProvider::class
                          to
                          ACME\HelloWorld\Providers\HelloWorldServiceProvider::class

                          Thank You

                          Y 1 Reply Last reply Reply Quote 0
                          • Y
                            yaser-az @prateek-webkul last edited by yaser-az

                            @prateek-webkul Hi,
                            Actually I already changed it to ACME\HelloWorld\Providers\HelloWorldServiceProvider::class

                            But still throwing the same error in console.
                            Do I have to do anything with the composer ? can you check the syntax I added in the composer ? Do I have to implement any commands to make it work first ?

                            Thanks

                            1 Reply Last reply Reply Quote 0
                            • N
                              Naresh-webkul last edited by

                              Hi,
                              @yaser-az .you can try these following commands
                              1- composer dump-autoload
                              2- php artisan route:cache
                              3-php artisan view:clear

                              Y 1 Reply Last reply Reply Quote 1
                              • Y
                                yaser-az @Naresh-webkul last edited by

                                @Naresh-webkul It worked after dump-autoload thank you.
                                I hope that I'm not bothering you with my issues 🐶
                                Thanks again, I'll let you know if there is any further issues or questions.

                                1 Reply Last reply Reply Quote 0
                                • N
                                  Naresh-webkul last edited by

                                  yes sure @yaser-az .

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    muhi last edited by muhi

                                    Thank you. This was helpful

                                    1 Reply Last reply Reply Quote 0
                                    • U
                                      Umesh last edited by

                                      I added a new theme for frontend but CSS is not working. please help me to solve the CSS issue

                                      1 Reply Last reply Reply Quote 0
                                      • V
                                        Vaishali Agarwal last edited by

                                        @Umesh
                                        Run the

                                        php artisan vendor:publish --force
                                        

                                        Thanks.

                                        1 Reply Last reply Reply Quote 0
                                        • A
                                          Aliyaa @Rafin last edited by

                                          @Rafin said in How can I change theme and write own html for front-end section not the admin panel?:

                                          What is the better approach to modify front-end theme without disturbing the core?

                                          Hi guys
                                          The preferred approach to modifying a front-end theme without disrupting the core is to utilize child themes.

                                          1 Reply Last reply Reply Quote 0
                                          • Referenced by  J juimas 
                                          • Referenced by  A Amitk-Webkul 
                                          • First post
                                            Last post