VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Jumpstart123 on February 06, 2014, 23:52:56 PM

Title: Thumbs Not centered
Post by: Jumpstart123 on February 06, 2014, 23:52:56 PM
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:
(http://coolmemories.com/images/virtuemart.PNG)

I know there is probably a simple fix to this.
Jumpstart
Title: Re: Thumbs Not centered
Post by: jenkinhill on February 07, 2014, 10:53:57 AM
http://forum.virtuemart.net/index.php?topic=79799.0
And http://forum.virtuemart.net/index.php?topic=116620.0
Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 07, 2014, 18:21:00 PM
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?
Title: Re: Thumbs Not centered
Post by: jenkinhill on February 07, 2014, 21:21:31 PM
Does the RT Paradox have template overrides for com_virtuemart?
Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 07, 2014, 22:24:27 PM
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.
Title: Re: Thumbs Not centered
Post by: jenkinhill on February 08, 2014, 13:14:00 PM
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

Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 10, 2014, 20:48:55 PM
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?
Title: Re: Thumbs Not centered
Post by: jenkinhill on February 10, 2014, 23:14:47 PM
Edit the file and use the edited file as an override..............
Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 10, 2014, 23:40:44 PM
Any hints on what to edit it to?
Title: Re: Thumbs Not centered
Post by: jenkinhill on February 11, 2014, 12:37:28 PM
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
Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 13, 2014, 21:54:49 PM
I have fixed with the guidance that you supplied. Looks great now thank you.
Title: Re: Thumbs Not centered
Post by: Jumpstart123 on February 13, 2014, 22:06:32 PM
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.