I don't like to display bottom of product image this text "Sorry, we currently have no stock for this item" and this "Current Stock Level"
How to disable this?
does nobody know this?
[attachment cleanup by admin]
Go to ...yoursite\components\com_virtuemart\views\category\tmpl\default.php and try to comment out the two lines below // Show Stock Status (in my VM2 SVN version lines 225 and 226)
Quote from: jjk on August 08, 2011, 21:33:33 PM
Go to ...yoursite\components\com_virtuemart\views\category\tmpl\default.php and try to comment out the two lines below // Show Stock Status (in my VM2 SVN version lines 225 and 226)
jjk thank you for your second help
THe best wway is to edit your language file to change the message in JOOMLAROOT\language\en-GB\en-GB.com_virtuemart.ini
and search for
COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_LOW_TIP="We are getting low on stock for this item"
COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_NORMAL_TIP="We have plenty of stock for this product"
COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_OUT_TIP="Sorry, we currently have no stock for this item"
adjust on your wish !
The proper way where to use template overide
See http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
I am not seeing those lines in my default.php file.
Quote from: dergy on August 08, 2011, 23:02:48 PM
Quote from: jjk on August 08, 2011, 21:33:33 PM
Go to ...yoursite\components\com_virtuemart\views\category\tmpl\default.php and try to comment out the two lines below // Show Stock Status (in my VM2 SVN version lines 225 and 226)
jjk thank you for your second help
Maybe you just dont want that option? The svn version has a config setting for it.
I removed line 217 to 222 in that file, and that did the trick:
Section to be removed:
<?php if (!VmConfig::get('use_as_catalog')){?>
<div class="paddingtop8">
<span class="vmicon vm2-<?php echo $product->stock->stock_level ?>" title="<?php echo $product->stock->stock_tip ?>"></span>
<span class="stock-level"><?php echo JText::_('COM_VIRTUEMART_STOCK_LEVEL_DISPLAY_TITLE_TIP') ?></span>
</div>
<?php }?>
@Milbo, so there is a way to disable it without hacking the VM code?
What is a SVN version? Would be nice if you could just disable it in the shop configuration.
Quote from: chaldama on February 01, 2012, 15:43:50 PM
so there is a way to disable it without hacking the VM code?
This is not "hacking the code", it is simply altering the template used to display the categories/products. This is a normal part of editing the layouts to suit your site.
I have requested the switch to be added into config.
@jenkinhill: OK, thank you!
Quote from: Milbo on January 17, 2012, 19:33:30 PM
Maybe you just dont want that option? The svn version has a config setting for it.
Where can I find the config setting to not work with stock levels?