News:

Looking for documentation? Take a look on our wiki

Main Menu

Category Name placement

Started by djmrman1, April 21, 2020, 06:49:35 AM

Previous topic - Next topic

djmrman1

HI hoping someone can help is there a way to have the category name at the bottom of the image is it some thing in virtuemart or the way maybe artisteer created the template

http://www.starlightcinema.co.nz/Farmers_Discount_Meats/

Thanks
Jeremy

Jörgen

This is a template issue. Compare to the VM demo in VM website or test with protostar or beez template.
Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

djmrman1

Still have it appearing above not below

Jörgen

#3
You are right, I see that now, I have an override in my template for this.

If i remember correctly, go in and change the file
templates/your template/html/com_virtuemart/category/default.php

If the file does not exist make a copy of the original file and use as override.

In the file You move the category description to where you want it.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

djmrman1

Found it in components/com_virtuemart/sublayouts/categories.php and about line 75 and changed it to the following

<h2>
          <a href="<?php echo $caturl ?>" title="<?php echo vmText::_($category->category_name) ?>">
          <?php // if ($category->ids) {
            echo $category->images[0]->displayMediaThumb("",false);
          //} ?>
          <br />
          <?php echo vmText::_($category->category_name) ?>
          </a>
        </h2>

Jörgen

Glad You found it, Sorry that I did not point to the correct file :(

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

djmrman1

No Problem you still got me to think of the issue in a Different way Thanks for your help

Jörgen

#7
Do not forget to make an override. You have changed core File.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

djmrman1

Could you please tell me the best way to create a override as I have never done that

Jörgen

Because Your fix works there is probabaly no override active right now, but just to be sure:

Check if the override exists:
templates/your-template/html/com_virtuemart/sublayouts/categories.php

If it exists make the correction in this file. if it doesn´t, copy your edited file into this position and restore the original file.

Then your changes will be safe for the next update of VM.

Yo can also go through Joomla and let Joomla prepare the overrides (copies the original files to Your template directory). The only downside is that this will make copies of all the files that can be used for override of com_virtuemart instead of just this file. A bit overkill if You do not make any other changes.

This time it would be good to make sure that Your override is the file used not the original file, btw do not delete the original usually it has to be there to make the override work. Make an debugging edit in the override to make sure that it is the file used, then clean up the edit.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

djmrman1

Thank you, You are truly a legend thanks for all your help.