It appears overrides in site_specific_styles.php do not affect styles in encapsulated plugins. Is there somewhere an override can be placed without modifying the core plugin code?
Thank you!
Dave
It appears overrides in site_specific_styles.php do not affect styles in encapsulated plugins. Is there somewhere an override can be placed without modifying the core plugin code?
Thank you!
Dave
A bit more detail on what you've tried and what you're trying to do would help me help you.
Hi Cindy,
I'm trying to change the text and color of the no stock message in POSM without changing the plugin core files, specifically PRODUCTS_OPTIONS_STOCK_NOT_IN_STOCK in my domain/zc_plugins/POSM/v6.1.1/catalog/includes/languages/english/extra_definitions/lang.products_options_stock_extra_definitions.php. I tried changing the color to #c7c7c7 in my domain/includes/templates/myTemplate/css/site_specific_styles.php but according to Firefox development tools, the POSM styles in options_stock_styles.css have higher priority as shown in the attached screenshot. How can I override both the define and the style?
Dave
![]()
Yep, as documented here, it's very difficult to override an encapsulated plugin's extra_definitions constants as they're the top-of-chain in the loading hierarchy.
My untried guess is that you could add another encapsulated plugin whose 'key' is alphabetically higher than POSM, e.g. XX_POSM, with its own extra_definitions overrides.
So I noticed while my encapsulated plugin's key was alphabetically higher, the plugin's name was not. So updated the plugin changing the version in the directory and in the manifest file, changing the name to be alphabetically higher than POSM. I upgraded the plugin in admin successfully, but the name did not change to what was in the manifest file. I changed the name manually in the database in table plugin_control. Now the revised name appeared in the admin plugin manager. But now the style was not overridden like it was with my original plugin. So I conclude that the style is overridden by the plugin with the lowest name alphabetically, not the highest key alphabetically. Summary:
Name | Key | Result
POSM Overrides | ZPosmOverrides | Style overridden
Z POSM Overrides | ZPosmOverrides | Style not overridden
For reference POSM name and key are:
Products' Options' Stock Manager | POSM
(I wonder how you insert tabs in these posts???)
The text was not overridden in either experiment.
Dave
Last edited by Dave224; 4 Aug 2025 at 09:04 PM.
The text I was trying to override was found in table products_options_stock_names, so I was able to change the text there. Overall I feel the approach to change the style with a plugin, in my case, was way too much work. Easier just to change the core POSM plugin code, or use javascript. Thanks Cindy for the POSM plugin and your suggestion.
Dave
Last edited by Dave224; 5 Aug 2025 at 03:53 PM.