Featured Products View File not Found
-
Hello Sir/Madam,
I am using the velocity theme and its showing featured & new product on the home page. That's Great.
I need to change some layout of featured & new product display. I debug a lot but still not found view file for it.
I found the following file which managing it as:
\bagisto\packages\Webkul\Velocity\src\Resources\views\shop\home\featured-products.blade.php
Inside this file, I got the following code which is generating product display at home page as:
<slide
:key="index"
:slot="slide-${index}
"
v-for="(product, index) in featuredProducts">
<product-card
:list="list"
:product="product">
</product-card>
</slide>I am not understanding the code, how it is working, how the view is calling, and where view file is located.
Please guide on this.
-
Hello there,
Basically slide and product-card are vue-components and we've defined inside assets directory.
You need to install dependencies (by executing npm i command inside packages/Webkul/Velocity directory) and run command npm run watch to make relevant changes in product-card component.
Let me know if you've any further query.
Thanks & Regards,
Shubham Mehrotra -
Hi Shubham,
Thanks for reply. We have done things at our local server.
We are using a shared server for now and uploading things so for. We have uploaded all "packages/Webkul/Velocity" folder but it's not effective online.
Please suggest to upload npm updates to online.
-
Hi @shubhwebkul ,
currently i have this issue too, why doesn't it use the card.blade.php template like the others ?
(it already there on the views folder)
instead, it is compiled in the .js..Is it possible to make it to refer to the blade template ?
maybe bagisto team have their own reason to use the .js instead of the blade template.
is it the performance related or something ? just curious.. -
@_developer_12
make sure of following
Have you added velocity's provider inside app.php resides under config directory ?
Have you executed php artisan vendor:publish command ? -
@otheriz
We've tried to ajaxify things, so whenever product card is rendered, it's mostly fetched from ajax that's why instead of fetching html of card we've passed product details to the product card component. -
Velocity's provider inside the app.php. It was there. So done.
We got able to run following commandphp artisan vendor:publish --all
But nothing updated. We have clear cache but its not effected.
Please suggest. -
What you see inside directory /resources/themes/velocity ?
-
We have changed theme path in "config/themes.php" to package velocity folder as:
'velocity' => [
'views_path' => 'packages/Webkul/Velocity/src/Resources/views/shop',
'assets_path' => 'public/themes/velocity/assets',
'name' => 'Velocity',
'parent' => 'default'
],directory /packages/Webkul/Velocity/ showing following files and folders:
- webpack.mix.js
- package.json
- composer.json
- .gitignore
- src (folder)
- publishable (folder)
- node_modules (folder)
Directory /resources/themes/velocity showing the following folder only:
- view
This the scenario, Please guide on this.
-
Have you tried changing views_path to resources/themes/velocity/views directory ?
-
At our local setup its working fine after run following command:
npm i
npm run watchThe changes reflected o the home page. ut it's not working on live side.
We have not changed anything at the following path
resources/themes/velocity/viewsPlease suggest.
Also, can you covey what is the difference (concept) to have velocity theme at the root level (/resources/themes/velocity) and package (/packages/Webkul/Velocity/) both side?
-
Please raise a ticket here and provide ssh details, we'll surely resolve the issue.
Thanks!