• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
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
1.5k
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 18 Mar 2020, 13:46

    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 19 Mar 2020, 05:15

      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 19 Mar 2020, 08:14

        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 19 Mar 2020, 08:20

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

          1 Reply Last reply Reply Quote 0
          • _
            _developer_12 last edited by 19 Mar 2020, 08:24

            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 19 Mar 2020, 08:30

              @_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 19 Mar 2020, 08:40

                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 19 Mar 2020, 10:05

                  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
                  2 out of 8
                  • First post
                    2/8
                    Last post