Jump to content

Recommended Posts

Following is a small module for managing custom shop overrides. Aimed at developers and system managers. I have only used it in test environments so far, so I cannot guarantee that it's working 100%, but it looks promising initially. Hopefully someone else has some use for it.

 
Use at your own risk.
 
OverrideManager
 
Module for managing overrides in PrestaShop. Keep track of the overrides
found in this modules "override" folder. These overrides are referred to
simply as "overrides" in the rest of this description.
 
FUNCTIONALITY
 
  • Enable and disable specific overrides from within PrestaShop
  • Logs which PrestaShop version the override was installed/last reviewed.
  • Nags administrators for reviewing overrides after core updates
  • Add comments to each override to quickly see their reason of existence.
 
USAGE
 
INSTALLATION: Upload the module to your PrestaShop installation.
Put your custom overrides in the module's override folder.
Install the module from your BackOffice.
 
MANAGEMENT: Your overrides can be managed at (BackOffice)/Modules/Override Manager
At this page you can see a list of overrides you have added to the module. Edit a
row to add/edit a comment to the override.
 
When you have updated PrestaShop to a new version, you will see a warning message
in BackOffice that the module needs your attention. To get rid of the message,
you will have to edit each override's settings and change last logged version to the
new PS version. The notice will not disappear until all overrides are flagged to
work with the current version of PrestaShop.
 
The same message appears as long as you have inactive overrides. The module installs
even if PrestaShop cannot install your overrides. The error messages can be seen on the
Override Manager page. Fix the errors, then try to reactivate the override by pressing
the [X] in the override list.
 
You can inactivate overrides for debugging/development purposes. The nag message will assure that
you remember to activate them later ;)
 
If you want to add more overrides later on, you will have to reset the module
after you have uploaded them to the module directory. A module 
reset preserves earlier entered data/comments.

overridemanager.zip

Edited by jgullstr (see edit history)
  • Like 1

Share this post


Link to post
Share on other sites

sounds nice, im going to test it :) thanks for your contribution ! :)

Share this post


Link to post
Share on other sites

sounds nice, im going to test it :) thanks for your contribution ! :)

Great - Let me know what you think and if you run into any problems :)

Share this post


Link to post
Share on other sites

Thank you for this module, I was looking for something like this. However, I can't get it to display the override files. I have PS 1.5

 

1. The module (.zip) installed fine and shows in the module bar and will open.

2. No overrides are shown

3. I have copied and or moved completely an override module (or any module) into the \my_store\modules\overridemanager\override\ folder and renamed the one under the \my_store\modules\ folder.

4. The override does not show in the override manager or now on my webpage.

5. I have also zipped the override manager folder with the new overrides and reinstalled into Prestashop, still does not work.

5. Can you please show a folder diagram on where the override files are to be.

Share this post


Link to post
Share on other sites

Thank you for this module, I was looking for something like this. However, I can't get it to display the override files. I have PS 1.5

 

1. The module (.zip) installed fine and shows in the module bar and will open.

2. No overrides are shown

3. I have copied and or moved completely an override module (or any module) into the \my_store\modules\overridemanager\override\ folder and renamed the one under the \my_store\modules\ folder.

4. The override does not show in the override manager or now on my webpage.

5. I have also zipped the override manager folder with the new overrides and reinstalled into Prestashop, still does not work.

5. Can you please show a folder diagram on where the override files are to be.

 

Hello,

The override folder in the module follows the same structure as Prestashop's ordinary overrides folder, eg if you want to override the class ImageType, you place your override in the file "overridemanager/override/classes/ImageType.php". You should not copy entire modules to this folder (?), only the content of the module's override folder in that case. I have the module up and running fine on a PS 1.5.5 instance. Hope this helps.

Share this post


Link to post
Share on other sites

Let me confirm, if I wanted to customize a class in a module, say blockcms.php in the \my_store\modules\blockcms\ module folder I would move the blockcms.php to the overridemanager/override/classes folder and then I can make changes the file?

 

Thank you for your time. I write PHP, Java, HTML etc but am new to the Prestashop setup. Seen soooo many web tut's that are wrong it spins my head.

Share this post


Link to post
Share on other sites

Let me confirm, if I wanted to customize a class in a module, say blockcms.php in the \my_store\modules\blockcms\ module folder I would move the blockcms.php to the overridemanager/override/classes folder and then I can make changes the file?

 

Thank you for your time. I write PHP, Java, HTML etc but am new to the Prestashop setup. Seen soooo many web tut's that are wrong it spins my head.

 

Prestashop's override functionality does not allow overriding module classes. This module is only for managing core overrides (classes and controllers found in PS_ROOT/classes and controllers, respectively). If you need to change a module, the easy way would be to copy and rename it. It should, theoretically, be possible to extend it in a new module, but I have never tried that, so I don't know what problems may arise.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

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