Bagisto Forum

    Bagisto

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

    Please tell me where is routes file of product details page on frontend ?

    General Discussion
    3
    8
    1451
    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.
    • _
      _developer_12 last edited by

      Please tell me where is routes file of product details page on frontend ? I could not find route file of this url "http://127.0.0.1:8000/product_1" ...... this url of product's detail page on frontend.

      And i am not finding view file of product details page on frontend not admin.

      Please solve me issue.

      Thanks

      1 Reply Last reply Reply Quote 0
      • J
        Jyoti last edited by

        Hi @_developer_12
        For routes file - packages/Webkul/Shop/src/Http/routes.php
        For view file - packages/Webkul/Shop/src/Resources/views/products/views

        1 Reply Last reply Reply Quote 0
        • _
          _developer_12 last edited by

          Thanks for reply.

          After a long debugging we just found that:

          We are using theme velocity and for this views files are located at:

          \resources\themes\velocity\views\products

          We found the files but not found the place where the path is define to load these files.

          Found following route:
          Route::fallback(\Webkul\Shop\Http\Controllers\ProductsCategoriesProxyController::class . '@index')
          ->defaults('_config', [
          'product_view' => 'shop::products.view',
          'category_view' => 'shop::products.index'
          ])
          ->name('shop.productOrCategory.index');

          Can you suggest, where is the path define to load view files of velocity theme?

          1 Reply Last reply Reply Quote 0
          • J
            Jyoti last edited by

            @_developer_12
            packages/Webkul/Velocity/src/Resources/views/shop/products/view

            1 Reply Last reply Reply Quote 0
            • _
              _developer_12 last edited by

              Thanks for quick reply.

              The path you have shared is NOT working for velocity theme.

              Following path is working for velocity theme.

              \resources\themes\velocity\views\products

              Can you suggest in application where the path is defined?

              1 Reply Last reply Reply Quote 0
              • J
                Jyoti last edited by

                @_developer_12
                It works according to current selected theme, for both theme route is defined in
                same file- packages/Webkul/Shop/src/Http/routes.php

                1 Reply Last reply Reply Quote 0
                • _
                  _developer_12 last edited by

                  As I have shared I found following code in route as:

                  Route::fallback(\Webkul\Shop\Http\Controllers\ProductsCategoriesProxyController::class . '@index')
                  ->defaults('_config', [
                  'product_view' => 'shop::products.view',
                  'category_view' => 'shop::products.index'
                  ])
                  ->name('shop.productOrCategory.index');

                  For "product_view" its calling view file from

                  \resources\themes\velocity\views\products

                  Instead of:

                  packages/Webkul/Velocity/src/Resources/views/shop/products/view

                  So there are two questions:

                  1. why is it not calling view file from packages/Webkul/Velocity/src/Resources/views/shop/products/view

                  2. As it calling from \resources\themes\velocity\views\products, then where is path is defined in application?

                  Hope you have got my point, please suggest.

                  1 Reply Last reply Reply Quote 0
                  • shubhwebkul
                    shubhwebkul last edited by

                    Hello there,

                    Answers:-

                    1 - In PROJECT_ROOT/config/themes.php, we've declared views_path, that's why the files are being called from resources directory.

                    2 - In depth routes are being called from the shop package, but it will render the file according to the current theme selected.

                    /packages/Webkul/Theme/src/ThemeViewFinder.php->findNamespacedView, this function calls the respective file dynamically.

                    thanks & best regards!
                    feel free to ask further queries.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post