News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

How to disable displaying...

Started by dergy, August 08, 2011, 01:15:33 AM

Previous topic - Next topic

dergy

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?

dergy

#1
does nobody know this?

[attachment cleanup by admin]

jjk

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)
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

dergy

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

Studio 42

#4
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

chadgarber

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
Chad Garber
Web Developer/Computer Support
770.639.4847
Garber Consulting, Inc.
http://garberconsulting.net

Milbo

Maybe you just dont want that option? The svn version has a config setting for it.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

roelschoen

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 }?>

chaldama

@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.

jenkinhill

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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

chaldama


becq

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?