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

Is that the default view? Really?

Started by mandingueiro, April 11, 2012, 18:27:47 PM

Previous topic - Next topic

mandingueiro

Hello ppl.

I've just installed VirtueMart on J2.5 and haven't changed anything (I'd like to go with the default template) but I get something like this: http://isleofeco.gr/index.php?option=com_virtuemart&view=category&virtuemart_category_id=8&Itemid=109

which is obviously messed up: images are not aligned properly with their descriptions, and I've set products per row to 3 but now only 2 are listed. Why is this happening? Does it have to do with the template I'm using or?

jenkinhill

It is a RocketTheme template with Gantry - there are problems with RT&G templates for displaying VM modules, but the issues can be resolved with some configuration, css and template overrides. eg see this thread: http://forum.virtuemart.net/index.php?topic=101060.0
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

far2slow

#2
I had the same problem I just changed

// Show Products ?>
      <div class="product floatleft width33">

to

// Show Products ?>
      <div class="product floatleft width31">

in /components/com_virtuemart/views/categories/tmpl/default.php

edit
and the image --  in the same file you will see  width30 floatleft  and width floatright 70     

change them to somthing like width28 floatleft  and width floatright 60   you will have to have a play see what works for you

this may not be the best way of doing it but is working for me at the moment

tzeus

I too have the same problem with the number of products displayed / row, and still haven't found a resolve yet.

adrianpaun

This problem appears because of the css file in youre template:

First we have the 100% width and three columns with 33% width.

If we had 1000px for 100% then we will have 330px for each column.

If you have 20px left-right padding or margin in youre css style for a column (product image, product name, or anything else from that column): you will have 20px + 330px + 20px wich is 370px

Then 370px * 3  = 1110px so basicaly you can place 3 columns in one row because your row have a maximum width of 1000px.

Thats the main problem for showing 3 products per row in 2 rows not one. :)

tzeus

Ty adi.
But the solution you provide, although it makes sense does not work, at least not for me. While increasing or decreasing the width of the div using class = "widthXX" just increases the image and text(not sure about text) inside the div.
The actual solution that worked for me is on the line where the width of the row is calculated

// Calculating Products Per Row
$products_per_row = VmConfig::get ( $type.'_products_per_row', 3 ) ;
$cellwidth = ' width'.floor ( 100 / $products_per_row );

I simply changed from 100 to 90, and it worked as explained here:
http://forum.virtuemart.net/index.php?topic=101060.0

Justin Holstein

If you have a rocket theme template, just do this.

add this to your template.css and clear your cache:
body div.floatleft {
float: left;
margin-left: 0px;
margin-right: 0px;}