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 turn off Virtuemart-category thumbnails? I just want a category list!

Started by adamjedgar, October 08, 2012, 03:27:05 AM

Previous topic - Next topic

adamjedgar

how do i only show my categories as a list...without any of those pesky category thumbnails.

I wish there was a simple checkbox in the Virtuemart admin to turn the damn things off. (this is an absolute pain in the "royal seat"!!! >:()

bytelord

Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

adamjedgar

hmmm,
i dont have an image placed for any categories, but it keeps putting in the default "no image" image whenever the categories are displayed in the main content area of my web pages. is it some kind of built in script? how do i turn that off??

bytelord

Hello,

Take a look here: http://forum.virtuemart.net/index.php?topic=106232.0

or you could just rename the image noimage.gif under com_virtuemart\assets\images\vmgeneral\noimage.gif, or create a no-image override with nothing 1x1p.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

adamjedgar

ok ill have a go at renaming the image.

btw,
in the code option shown below from that other topic you posted...where do i go to insert that code? (i'd like to be able to edit the code as well but havent a clue where i insert it.)
<?php  if (count($category->virtuemart_media_id) > 0) {
       echo $category->images[0]->displayMediaThumb("",false);
   } ?>

bytelord

That the best way. So you have to create a template override if you haven't already a custom vm template.
If you use overrides then the file is located under your_joomla_folders/templates/your_joomla_templa/com_virtuemart/category/default.php
Edit the file, around line 109 you will find the following line:

echo $category->images[0]->displayMediaThumb("",false);

Relace that line with the following 3 lines:

<?php  if (count($category->virtuemart_media_id) > 0) {
       echo $category->images[0]->displayMediaThumb("",false);
   } ?

if do not use template overrides the default vm template located under your_joomla_folder\components\com_virtuemart\views\category\tmpl\default.php

Copy that file under your_joomla_folders/templates/your_joomla_templa/com_virtuemart/category/default.php
(if the folders doesn't exist create them).

So you have create a template override. Edit the new file and place the lines, save, test it...

More information regarding template overrides could be found here: http://forum.virtuemart.net/index.php?topic=98505.0
Also you could use firebug to examine your site code and css styling: http://forum.virtuemart.net/index.php?topic=102850.0
Using template system: http://dev.virtuemart.net/projects/virtuemart/wiki/Hints_for_the_use_of_the_template_system

Hope it helps you out

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

adamjedgar

is it possible to create a template override for this in a generic folder so it affects all templates?

i am still working with the default Beez 20 template but intend to change to another one i have downloaded that i like at some point in the future.

bytelord

Hello,

when you will change you could copy your file over there ... will work the same. Or from the backend under configuration->templates you are able to select vm templates override.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

adamjedgar

i think ill go with the templates override in the backend so long as that doesnt automatically get changed back to the defaults if an update for virtuemart is installed!

would a virtuemart update change this setting?

bytelord

Hi,

Normally will not, but is just a click away :)
But don't forget when you upgrade vm to a newer version there will be probably template changes, so you will have to "correct" your custom templates.

Regards
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

adamjedgar

agh, im getting sideswiped at every point in this venture.

my problem is remembering where everything is. i have to keep doing something over and over again or i forget very quickly how to do it. i have already forgotten where on earth the default location is for the noimage.gif so i can replace it with the new 1x1 px one i made.

Ill go back through this thread and re-read it all anyway. Actually im going to end the other thread i started in Virtuemart>Administration as im getting confused which one im responding too...they have now got a bit blurred i think!

adamjedgar

found it, \components\com_virtuemart\assets\images\vmgenera

(i cheated...went to my local Virtuemart instillation and did a search for it using explorer) :P 8)

adamjedgar

woops didnt paste whole link (and i used the local machine "\" instead of web url "/".

/components/com_virtuemart/assets/images/vmgeneral/noimage.gif

bytelord

Fine,

but as i said better way is to use the code. You could create another image for that instead of replace noimage.gif and selected from the backend because next time you will upgrade vm noimage.gif will be replaced with the original. So create one with different name and paste it there. After select that one from the backend, or you could place it to your template images folder.

Regards.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

2dmaster

// magic fix
/html/com_virtuemart/category/default_categories.php
<div class="spacer">
<a href="<?php echo $caturl ?>" title="<?php echo $category->category_name; ?>"><?php echo $category->category_name; ?><br />
                     <?php // if ($category->ids) {
                    if (!empty($category->images[0]->file_name)) { // magic fix
                            echo $category->images[0]->displayMediaThumb("",false); // output <img src... />
                            }
                     //} ?></a>
</div>

e.g. at my site http://enimpuls.ru/
whats all '$category->images' have and params ??