VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: zippygaloo on December 30, 2011, 20:35:51 PM

Title: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: zippygaloo on December 30, 2011, 20:35:51 PM
I've seen other posts regarding changing or removing the stock level graphic and text for the product view, but how do I remove the "Current Stock Level" graphic and text in the category view of my products?
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: Zuske on December 31, 2011, 01:10:50 AM
i have the same issue, for my store it is not necessary to display the stock availabitliy at all. This should be optional or am i missing something.
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on December 31, 2011, 11:24:35 AM
http://forum.virtuemart.net/index.php?topic=90935.0
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: zippygaloo on December 31, 2011, 23:16:46 PM
Quote from: BanquetTables.pro on December 31, 2011, 11:24:35 AM
http://forum.virtuemart.net/index.php?topic=90935.0

I've seen this response about 100 times, read over it 100 times, tried to follow it 100 times and failed every single time. Mainly because I can't find the right file and/or the right line of code to change. A search for "stock" in the default.php file in the correct directory doesn't produce anything either.
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on December 31, 2011, 23:52:40 PM
views/category/tmpl/default.php

Product Stock Level Picture

                  <?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 do I remove "Current Stock Level" graphic and text in the category view?
Post by: zippygaloo on January 01, 2012, 01:19:27 AM
Quote from: BanquetTables.pro on December 31, 2011, 23:52:40 PM
views/category/tmpl/default.php

Product Stock Level Picture
                  <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>

Thank you very much. That worked perfect.

Now is there any way to add an "add to cart" button for each product in the category views?
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on January 01, 2012, 15:28:38 PM
look at the stickies
http://forum.virtuemart.net/index.php?board=130.0
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: igm108 on January 06, 2012, 17:57:44 PM
Quote from: BanquetTables.pro on December 31, 2011, 23:52:40 PM
views/category/tmpl/default.php

Product Stock Level Picture
                  <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>

So, I found this code in my file... (without the Product Stock Level Picture comment), but I don't know what to do to it to get rid of the stock image/text successfully. (sorry.. kinda slow, here!) When I delete what you have shown, the stock information goes away, but unfortunately then, when I hit the Product Details button, my product page is blank.

I'm new at templating... Please help?
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: igm108 on January 06, 2012, 18:16:54 PM
Hmm.. Just Kidding.. I'm thinking I did something else to break that. I just have to figure out what.. Haha.. Ignore my last comment for now.

Thx.
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on January 06, 2012, 18:18:40 PM
In the current category template, remove this



                  <?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 do I remove "Current Stock Level" graphic and text in the category view?
Post by: johnnyboy_31 on January 21, 2012, 21:16:16 PM
Hi,

I would like to remove the "current stock level"

So I removed that piece of code from default.php and named it john_2.php

And put it here:

/web/components/com_virtuemart/views/category/tmpl


To override the Joomla template I also placed john_2.php in this folder
/web/templates/beez/html/com_virtuemart/category

Then In the VM config: I choose "john_2" as a category layout.

But now I get this error:

500 - Layout "john_2" not found

Any help is welcome!

http://www.sequoiabomen.nl/index.php?option=com_virtuemart&view=virtuemart&Itemid=83&lang=nl

Thanks!

John
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on January 22, 2012, 19:24:43 PM
have you tied doing a layout overrride?
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: johnnyboy_31 on January 22, 2012, 21:21:16 PM
Hi,

Is a "template override"  anything else than I already did?

I thought that I performed all steps, am I missing something?

Thanks,

John
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: PRO on January 23, 2012, 02:39:29 AM
http://forum.virtuemart.net/index.php?topic=90935.0

http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: MaxPower on March 02, 2012, 22:50:09 PM
The easiest way to do this is to use CSS

.stockLavel {
   display:none;
}

However, I am a little confused of why there is an option in the VM configuration to disable this feature but it doesn't work. There are also other configuration toggles like "Show the Ask a question link?" that do nothing as well. Any ways, its just the typical get what you pay for software... Here's the new version.. find the bugs for us mentality. Will fix the bugs in 6 months and then they will reappear later.

On a side note... I am logged in and I still have to enter in captcha? Thanks for that
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: jenkinhill on March 03, 2012, 21:51:08 PM
The "Show the Ask a question link?" switch works in all my 4 J2.5.1/VM2.0.2 test sites. I dont use stock so have removed it from the templates with override.

And yes, you will initially trigger the forum anti-spam measures, which are needed.
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: mexicanoo on April 04, 2013, 20:17:42 PM
<?php if (!VmConfig::get('use_as_catalog') && (VmConfig::get 'display_stock')) ){?>
<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 }?>


how to change "Current Stock Level" in "Out of stock" text in category view when a product is out of stock?

[attachment cleanup by admin]
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: changlee on February 13, 2015, 17:58:58 PM
Quote from: PRO on December 31, 2011, 23:52:40 PM
views/category/tmpl/default.php

Do you mean

/public_html/administrator/components/com_virtuemart/views/category/tmpl

OR

/public_html/components/com_virtuemart/views/category/tmpl ?

Quote from: mexicanoo on April 04, 2013, 20:17:42 PM
how to change "Current Stock Level" in "Out of stock" text in category view when a product is out of stock?

Did you tried the language overrides?
Title: Re: How do I remove "Current Stock Level" graphic and text in the category view?
Post by: jenkinhill on February 14, 2015, 00:25:57 AM
Why are you replying to a 1-2 year old thread about out of date versions?