Jump to content

Add Bootstrap CSS/JS in module if they not exist in theme


Recommended Posts

I'm developing a module using some bootstrap code, and I want to know how I can use addCSS and addJS to add bootstrap core files inside the module and override the existing ones in case the theme is already using them...to avoid enqueuing duplicated files.

 

Is there a way to do this? In Woocommerce it's possible to do cheking if the files are already enqueued or not, but I don't know if Prestashop has something similar.

Link to comment
Share on other sites

Thanks Vekia I will search/try for other options, but I think there's not much to do with prestashop... I think the best way is to merge both methods...do a Media class override to check the files adeded by AddJs and if they not exist as the standard names...search them inside the most typical directories where we can found these files.

Link to comment
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
×
×
  • Create New...