Jump to content

Override themes/core.js


NeroAdvents
 Share

Recommended Posts

You could create a copy of the file, then put your file with the changes. When uninstalling the module, you will need to put the original file back.

Share this post


Link to post
Share on other sites

7 hours ago, joseantgv said:

What do you need to do?

I need to check if the cart is orderable before the redirection to the payment page. I applied what I found here https://github.com/PrestaShop/PrestaShop/pull/26048.

So far, I've applied changes to themes/core.js file and overrode the OrderController in override/controller/front/OrderController.php file with the needed code. Working fine.

This need was created for a custom module, where I needed to call external API methods before the redirection to the payment page. That's why I wanted to know if it was possible to override themes/core.js file from a module.

If it's not possible, I'll leave it like that, waiting for the release of the functionality.

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More