VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: oneyozfest182 on April 15, 2015, 19:34:41 PM

Title: Hide Category Names - Keep Category Images - On Store Front?
Post by: oneyozfest182 on April 15, 2015, 19:34:41 PM
Using Beez3 template, I would like to hide category names on the store front if possible. I need the category names to still work as they show in the dropdowns and stuff in certain places, but on the main store front, it displays a category image which we use specific fonts for certain collections and want the standard text hidden. See attached.  :)

(http://i.imgur.com/qMMxTvg.png)

Virtuemart Version: 3.0.7.4
Joomla! Version: 3.4.1

Site Information
    OS Linux b
    PHP 5.3.13
    MySQLi 5.5.32-log
    Caching Disabled
    GZip Disabled
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: PRO on April 15, 2015, 20:53:20 PM
what version are you using?
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: oneyozfest182 on April 15, 2015, 21:03:21 PM
VirtueMart 3.0.7.4
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: jenkinhill on April 15, 2015, 23:16:29 PM
This is done by creating an override for components/com_virtuemart/sublayouts/categories.php where you either remove the category name code from the following, or add in a class so that the category name can be hidden by css.

    <h2>
          <a href="<?php echo $caturl ?>" title="<?php echo vmText::_($category->category_name) ?>">
          <?php echo vmText::_($category->category_name) ?>
          <br />
          <?php // if ($category->ids) {
            echo $category->images[0]->displayMediaThumb("",false);
          //} ?>
          </a>
        </h2>
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: oneyozfest182 on April 16, 2015, 15:01:35 PM
Is that one of the core components? Only reason I ask is I know messing with the core components can be really risky. I want the category names to still work because of the side-bar module in my template that lets you see a list of the categories, but when there is a picture available for the category, in our instance, it makes it redundant.

Side note; I'm also having an issue where when I go to the Manufacturers section of Virtuemart, no Manufactures show. I add a new one, type all the details, save it, then go back to the Manufacturers section again and nothing is there. I can't choose the manufacturers on any frames I select or anything either, but the "Manufacturers" side-bar from the template still shows them...  :-\ Scratching my head a lot over some of these weird hiccups...
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: jenkinhill on April 16, 2015, 15:05:18 PM
No it is not core that you edit, it is a template file and you make an override for the default file so that the edit is not lost when you next update.
http://docs.virtuemart.net/tutorials/templating-layouts.html

The Manu issue is not template related so should be posted in the admin forum.
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: oneyozfest182 on April 16, 2015, 15:26:28 PM
Okay I found that line. What is it that I need to add and/or change? Sorry for the "noobie" question.
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: GJC Web Design on April 17, 2015, 00:20:11 AM
 <?php // echo vmText::_($category->category_name) ?>
Title: Re: Hide Category Names - Keep Category Images - On Store Front?
Post by: oneyozfest182 on April 24, 2015, 23:19:45 PM
YOU'RE A HERO!!!