Can i create a PHP PDO project in my vue-project? - pdo

I want to create a pdo project inside a vue-js simple-webpack template is it possible ? my back end is php(PDO) and my front end is vue

Related

Prestashop 1.7 hook displayCarrierExtraContent not working in admin while creating new order

I am using prestashop 1.7.8.7 and on front end on checkout page i'm using this hook displayCarrierExtraContent to show extra carrier content.On Front end this hook works fine. Here is the front end screenshot https://prnt.sc/XWalq-7uPm09
But how we can achieve same functionality in backend while admin create new order from backend ?
It seems that this hook displayCarrierExtraContent work only on front end but not in backend.
Here is the backend screenshot https://prnt.sc/iLuTP707p8yO
Is there any hook so that we can achieve same functionality in admin also while creating new order ?

How to fetch Data from a getRequest and store them inside an xlm file in Vue2

Im working on a personal project trying to learn Vue. I was wandering is there anyway to Fetch data from backend and store them inside an xml file. I mean I to make a button saying Download and everytime I press it, i want to getAll data from the db and store them inside an xml file. Any idea how to achieve it? Im currently working with Vue on front and Springboot for back

Express Redirect to Reload the Webpage Does Nothing, Using Pug for Views

I have a function in express that updates a user in the database. The current url where this function is run, is at localhost:3000/users/specuser?key=<MY USER'S KEY HERE>. When I update the user in the database, the webpage should change to load the new db value (which is accessed in the view). I tried this code at the end of the function to try to reload the page.
res.redirect(302, '/users/specuser?key=<MY USER'S KEY HERE>');
return;
But the page doesn't reload. I'm assuming that's because express sees the same url that the user is currently navigated to and ignores it? How do I reload the page so that the view sees the new user data and changes?
It's worth noting that when I change the end of this function to:
res.redirect(302, '/');
return;
The website does navigate to the root directory
It might also be worth noting that my views are written in pug js.
I fixed it in the client side. In my pug view I have a script tag script(type='module' src='/javascripts/specuserexists.bundle.js') which links to a webpack compilation of a simple js file where my function is run that called the update to the user. At the end of this update the user function, I added location.reload(); and then it worked.

Vue - Switch between two different templates

I've been developing a new Vue project to control the connected devices from one point, I've been working on an admin template and it's all good but there is something that I want to learn and implement to this application.
Let's say I want to change the whole frontend template (the admin template that I'm using now) and use a new design, how can I implement the whole existing application to a new template? For example, when you start creating a Wordpress page, it gives you different templates and you choose some of them and start designing the website... Maybe after six months you want to change that design and you simply click and switch to a new template and all the existing content will be migrated to the new template. That is exactly what I want to do with Vuejs.
I have to do this project, which I prepared with the existing theme, dynamically, as if I will pass it to another theme in the future. When switching my existing project to a new theme, instead of copying all the components and their related scripts, I want to be able to switch just like in Wordpress by simply throwing the theme file into the project. How can I add this functionality to the project?

How do I return a partial, not a view, to the front end? Can I return a partial without a page refresh?

So I'm working in express and using hbs as my view engine. I want to make a fetch call from the front end passing form data to my express server. I then want to send a partial with the data sent from the front end to the front end so only that section of the page is updated. Also I want the page to not refresh so I want it to be asynchronous. Is this possible and, if so, how can I do this?
I tried the same long time ago with ajax/jquery, and It could be exausting, extense etc, I recomend to you use vue, react or angular, to handle your front end.
If you want to continue with this you can see this answer:
express.js how to update UI without refresh all page using handlebars