VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: dergy on August 08, 2011, 01:15:33 am

Title: How to disable displaying...
Post by: dergy on August 08, 2011, 01:15:33 am
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?
Title: Re: How to disable displaying...
Post by: dergy on August 08, 2011, 18:30:38 pm
does nobody know this?

[attachment cleanup by admin]
Title: Re: How to disable displaying...
Post by: 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)
Title: Re: How to disable displaying...
Post by: dergy on August 08, 2011, 23:02:48 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
Title: Re: How to disable displaying...
Post by: Studio 42 on August 10, 2011, 01:29:18 am
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
Code: [Select]
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
Title: Re: How to disable displaying...
Post by: chadgarber on January 17, 2012, 17:56:57 pm
I am not seeing those lines in my default.php file.
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
Title: Re: How to disable displaying...
Post by: 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.
Title: Re: How to disable displaying...
Post by: roelschoen on January 31, 2012, 09:19:05 am
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 }?>
Title: Re: How to disable displaying...
Post by: chaldama on February 01, 2012, 15:43:50 pm
@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.
Title: Re: How to disable displaying...
Post by: jenkinhill on February 01, 2012, 16:39:46 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.
Title: Re: How to disable displaying...
Post by: chaldama on February 04, 2012, 00:20:31 am
@jenkinhill: OK, thank you!
Title: Re: How to disable displaying...
Post by: becq on March 22, 2012, 12:59:56 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?