how can override shop and admin vue js in new package
-
how can override shop and admin vue js in new package
-
Hi @zainawan99
You can override vue js by override view file.
You can read this one - https://forums.bagisto.com/topic/221/how-to-override-view-file-in-bagisto
For overriding admin file:-
So you need to create a view file (In your package & follow same path structure as core 's view file consist ) & publish this file according to path of that suggested in above topic or core's view file has, in your package's service provider. Like
$this->publishes([ __DIR__ . '/../Resources/views/admin/catalog/products/edit.blade.php' => resource_path('views/vendor/admin/catalog/products/edit.blade.php'), ]);
Thanks
-
@vishalK not view file vue js file webkul admin and shop components
-
Hi @zainawan99
There are two ways:
First:-
First of all you have to create vue.js component file inside your package following the same path as you see in other package and create publishable asset by running npm run prod inside your package than you need to publish all asset of your package by using php artisan vendor:publish in root directory and then use this vue.js component in your view file and use view override technique to replace your view file with the existing one to reflect changes in front end so that's how you can overrride vue.js component.
Second:-
Make changes in the existing vue.js component according to your need.
then run npm run prod inside package and run php artisan vendor:publish in root directory. -
@vishalK i m create new package ACME/Category/ in this package how can use?
-
@vishalK kindly update your documentation most things are not added then every person contact this forum.
-
@zainawan99 , did you find any way to achieve this?
@vishalK ,please tell me the exact way to do this, I want to override a VUE.JS file in my custom package?