Author Topic: How do I remove "Current Stock Level" graphic and text in the category view?  (Read 13412 times)

zippygaloo

  • Guest
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

  • Beginner
  • *
  • Posts: 29
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.

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

zippygaloo

  • Guest
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
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 }?>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

zippygaloo

  • Guest
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?

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

igm108

  • Beginner
  • *
  • Posts: 2
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

  • Beginner
  • *
  • Posts: 2
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
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 }?>
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

johnnyboy_31

  • Beginner
  • *
  • Posts: 14
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

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
have you tied doing a layout overrride?
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

johnnyboy_31

  • Beginner
  • *
  • Posts: 14
Hi,

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

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

Thanks,

John

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10400
  • VirtueMart Version: 3+
J3.9+ VM 3.4.2
Slowest Page Speed Score (88) (Category)
Fastest Page Speed Score (94-96) (productdetails)

MaxPower

  • Beginner
  • *
  • Posts: 2
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