VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Matt_Ginn on January 21, 2014, 16:45:56 PM

Title: Override stockable plug-in
Post by: Matt_Ginn on January 21, 2014, 16:45:56 PM
Hi. I made some changes to stockable.php in plugins/vmcustom/stockable to display stock levels of child products created using the stockable variant plug-in. Is there any way of making this an override so that it doesn't get overwritten when Virtuemart gets updated??
Title: Re: Override stockable plug-in
Post by: jenkinhill on January 21, 2014, 18:16:08 PM
It is a standard Jpoomla plugin so that is a Joomla issue,  see here. (http://lmgtfy.com/?q=joomla+2.5+override+plugin)
Title: Re: Override stockable plug-in
Post by: mhuebler on February 28, 2014, 17:26:14 PM
hello Matt_Ginn,

do you can share your changes to display the stock level of child products with stockable plugin ? i search a long time for a solutionn :-(
Title: Re: Override stockable plug-in
Post by: stanza_nate on March 24, 2014, 09:38:57 AM
I know this is an old thread, but this is the only thing I could find when I searched for this problem and I figured it could help future people...

jenkinhill, that answer is totally not helpful, there are no helpful links for this particular file in that search. The reason for that is this plugin is not overridable as it doesn't contain a /tmpl/ folder - it is just in plugins/vmcustom/stockable/ This means the only way to change it is to just edit the file, keep a backup and replace it every time you update Virtuemart/Joomla.

The problem I've run into (which is different to OP's by what I can tell), and how I came across this thread is that there is inline CSS within the stockable.php file, meaning that the product option descriptors (under the div stockableBlockIndex-**-*, where * changes with each item) are set as black by default with no way to override it via template CSS. With a dark background, as I have, it's unreadable and looks terrible.

If anyone comes across this post that can point me in the right direction to contribute some code to fix this problem in a future release, I'd be more than happy to donate some of my time!