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 do I remove "Current Stock Level" graphic and text in the category view?

Started by zippygaloo, December 30, 2011, 20:35:51 PM

Previous topic - Next topic

zippygaloo

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?

Zuske

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.


zippygaloo

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.

PRO

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

zippygaloo

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?


igm108

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?

igm108

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.

PRO

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

johnnyboy_31

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

PRO


johnnyboy_31

Hi,

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

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

Thanks,

John


MaxPower

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