News:

Support the VirtueMart project and become a member

Main Menu

Thumbs Not centered

Started by Jumpstart123, February 06, 2014, 23:52:56 PM

Previous topic - Next topic

Jumpstart123

Hey guys,
I am having an issue with the product thumbnails not being centered. Can someone send me the quick fix that I know is out there.

Example of what I am talking about:


I know there is probably a simple fix to this.
Jumpstart

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jumpstart123

Apologies for not seeing another thread saying to post the version. I am also a web designer and know coding and the techniques to find the issue. This one though is past me so could I get a little help? Version is 2.0.26d latest version as far as I know. Joomla version is 2.5.18. The template is one from rockettheme named paradox. Any ideas how to fix it?

jenkinhill

Does the RT Paradox have template overrides for com_virtuemart?
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jumpstart123

I do not believe so. But in case it does is there a way to make it none overrideable (i know its not a word) in com_virtuemart. I installed virtuemart separately so it shouldnt have the overrides. But there could be a line of code thats acting as an override. Should be a simple fix though still.

jenkinhill

Check your RT template's html directory, if there is a sub-directory there called com_virtuemart then rename it to prevent any overrides from working.

The VM template file to edit is  components/com_virtuemart/views/category/tmpl/default.php

You just have to sort the layout of two divs, beginning <div class="width30 floatleft center">  and  <div class="width70 floatright">

Use the edited template as an override if you don't have them already, or edit the template/html/com_virtuemart/category/default.php file if one previously existed.  See http://docs.virtuemart.net/tutorials/33-templating-layouts.html and http://www.ostraining.com/blog/joomla/overrides

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jumpstart123

Im kinda confused at what you are saying here. Can I edit that php file directly to fix the issue? Or do I need to edit something else or even create an override?

jenkinhill

Edit the file and use the edited file as an override..............
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jumpstart123

Any hints on what to edit it to?

jenkinhill

But you said:
Quote from: Jumpstart123 on February 07, 2014, 18:21:00 PM
I am also a web designer and know coding and the techniques to find the issue.

I already indicated the divs to you. Change/add your own css classes so you can make the layout changes
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Jumpstart123

I have fixed with the guidance that you supplied. Looks great now thank you.

Jumpstart123

To everyone that may have had issues with this.

On the php file: components/com_virtuemart/views/category/tmpl/default.php

I edited the above field <div class="width30 floatleft center"> and <div class="width70 floatright">.

I changed both of them to:
<div class="width70 floatleft center">

This centered both the text and the image.

Also I added <p></p> after the line:
<?php echo $product->images[0]->displayMediaThumb('class="browseProductImage"', false); ?>
This created a space between the image and the name as well.